Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Not supporting ns4.x, ms4.x How to post mesagge to those Broswers?

Status
Not open for further replies.

newcow

Technical User
Feb 24, 2004
80
0
0
CA
Hi,
My website is testing on IE5.01, 5.5, 6.0SP1; NS6.2.3, 7.1, Mozilla 1.6; Firefox 0.8; Opera7 & Safari 1.2 . I am not supporting NS4.x or IE4.01.

I have all my presentation markup in css files and am not using tables except for tabular data.

I have make a ID called oldbrowsermessage and I have this ID setup to display:none; in the CSS sheet. NS4.x shows this message and the site looks fine with no CSS. I am wanting to hide the CSS from IE4.01 so it will do the same thing.

Message that I want to display.
Car Dealer Inventory Application Web Site Vehicle Listing Software, Full Car Dealer Web Sites or Plug-In Inventory Module for your Currrent Web Site.
Please Note: You are viewing the unstyled version of Either your browser does not support CSS (Cascading Style Sheets) or it is disabled.

Is this a correct way to do things? Is the above message ok? If so what do I need to do to get IE4.x to not see my CSS file?

newcow
 
Hi Vragabond ;
Thanks for the link. I have seen those. I guess my problem is I have to different style sheets. One for print and one for screen. I need some way for everything above ns4.x and ie4.x to be able to get those 2 style sheets.

Right now I have a test page and I have it hide from both ns4.x and ie4.x by providing the CSS sheet the following way.
Code:
<style type="text/css"><!-- @import "stylecss.css"; --></style>

But this doesn't give me the option of including a sheet that is for media="printer". On my styleprn.css sheet I do a display:none; on my graphicheader, menu and footer.

I am trying to find some thing that will work with out going to js. But if all fails I guess I will have to give in and go that way.

newcow
 
You can have multiple style sheet includes. An alternative to the <style></style> convention is:
Code:
<link rel="stylesheet" type="text/css" href="xxxxx.css" [COLOR=red]media="print"[/color] />

<marc> i wonder what will happen if i press this...[ul][li]please tell us if our suggestion has helped[/li][li]need some help? faq581-3339[/li][/ul]
 
Hi manarth;
I am not sure but you may of missed what I am trying to do. In my first post I stated "I am wanting to hide the CSS from IE4.01 so it will do the same thing."(do the same thing that ns4.x doesn't -- doesn't see the css and displays my pages with NO format from CSS).

I have now currently:
<link rel="stylesheet" type="text/css" href="stylecssprn.css" media="print" />
<link rel="stylesheet" type="text/css" href="stylecss.css" media="screen" />
And that works find but IE4.01 can see this. I am wanting to hide my CSS form IE4.01 so it it display my content with out the CSS format.

Hence I make up my test page and used:
Code:
<style type="text/css"><!-- @import "stylecss.css"; --></style>

Check out my page and you will see that is what I have on that page. If you look at the source of you will see that I have the above code. If you have 4.01 installed check the page and you will see that IE4.01 gets no CSS and shows only the content.

My problem is that the above code doesn't give me the ability to have a style sheet for media print. I need a media print sheet because I want to set my grahpicheader, menu and footer to display:none; for printing.

newcow
 
something like this?
Code:
<style type="text/css" media="print">@import url(print.css);</style>

<marc> i wonder what will happen if i press this...[ul][li]please tell us if our suggestion has helped[/li][li]need some help? faq581-3339[/li][/ul]
 
another point: I noticed the cascade:
Code:
<link href="stylecssprn.css" rel="stylesheet" type="text/css" media="print" />
<link href="stylecss.css" rel="stylesheet" type="text/css" media="screen" />
<style type="text/css">@import url(stylecss.css);</style>

The normal cascade is
- everything (<link)
- compliant browsers (@import)
- print css (<link)

<marc> i wonder what will happen if i press this...[ul][li]please tell us if our suggestion has helped[/li][li]need some help? faq581-3339[/li][/ul]
 
Actually, this code allows you to specify the media. Check the w3:


The syntax:
Code:
@import url("fineprint.css") print;

could probably be changed to look like:
Code:
@import url "fineprint.css" print;

But beware: I have heard that no IE can understand @import when more than one media types are applied.
 
Hi manarth ;

The whole idea in my post is to hide my CSS from IE4.01 so it will only display content. Also to have IE5.01, 5.5, 6.0SP1 see stylecss.css and stylecssprn.css .
I can use the following and that does the frist part for me - hides my stylecss.css sheet from IE4.01.
Code:
<style type="text/css"> <!-- @import "stylecss.css"; --> </style>
But I need for IE5.01, 5.5 6.0SP1 to see my stylecssprn.css . If I add your below code then IE4.01 will pick it up and apply what it can of stylecssprn.css includeing the display:none; for my graphicheader, menu & footer.
Code:
<style type="text/css" media="print">@import url(print.css);</style>
Thanks for pointing out the normal cascade of the CSS sheets!

Hi Vragabond ;
Neither of your two examples will work for me when I put them in the form that I have my CSS sheet currently in that works in IE5.01, 5.5 & 6.0SP1 but is hid from IE4.01:
Code:
<style type="text/css"> <!-- @import "stylecss.css"; --> </style>
I tried both of the following and played with them some and they will not display the css to IE 5.01, 5.5 or 6.0SP1.
Code:
<style type="text/css"> <!-- @import url("stylecss.css") screen; --> </style>
Code:
<style type="text/css"> <!-- @import url "stylecss.css" screen; --> </style>

It is looking more and more all the time like I am going to have to go with js to be able to have a screen and a print CSS sheet that works with IE5.01, 5.5, 6.0SP1 with is hid from IE4.01.

newcows
 
Hi,

The following 2 lines fixed the problem. NS4.x & IE4.x are not both blind to my CSS.

Code:
<style type="text/css" media="all">@import "stylecss.css";</style>
<style type="text/css" media="print">@import "stylecssprn.css";</style>

Go and take a look at in NS4.x or IE4.x and see how it works.

newcow
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top