Previous Message
Next Message

RE: [css-d] browser support...

Sent by Geoff Sheridan on 19 September 2002 16:04


If you have a special reason for wanting to give IE4 a different 
stylesheet to the <link>ed base styles then the method you describe 
is not unreasonable. However:

<!-- for NN4 and all others -->
<link href="base.css" type="text/css" rel="stylesheet">

<!-- hides from NN4 only- IE 4 specific styles here -->
<link href="ie4plus.css" type="text/css" rel="stylesheet" media="all"/>

<!-- for IE5+, NN6, Moz, Opera et al. Overide IE4 specific styles here -->
<style type="text/css">@import("hightech.css");</style>

needs no script, the only potential problem is that standards 
browsers will see all three sheets, so you'll have to ensure they 
play together.

I would suggest that the base styles will probably be good enough for 
IE4 anyway.

HTH

Geoff

>1. set the base styles using the link rel - for all browsers that 
>have some CSS support.
>2. browser sniff to see if it's IE4
>3. If it's IE4, then do some makeshift stylesheet (or just leave it 
>with the base styles) that makes it readable, and if not, then just 
>write out the @import bit to handle everything else.
>4. in the noscript tag, write out the @import bit anyway, so that if 
>you have javascript turned off it defaults to assuming you have a 
>good enough browser to support it.
Previous Message
Next Message

Message thread:

Possibly related: