Style Sheets for Firefox and IE6/7

Soldato
Joined
18 Oct 2002
Posts
5,832
Location
Liverpool :-)
I've noticed that IE doesnt render the webpage like Fire Fox, i've decided to use one stylesheet for fire fox and one for IE.

Does this code look right? As it doesn't seem to be do anything

<link rel="stylesheet" type="text/css" href="style.css">
<!--[if IE 6]>
<link rel="stylesheet" type="text/css" href="iestyle.css"/>
<![endif]-->

They both exist and as a test, i'm having some problems with text in a footer. So i've changed the padding on the iestyle.css sheet and nowt happens.

Am i missing something?
 
You are testing this in IE6, right? I ask, because your conditional comment specifically targets IE6 only. If you're testing solely in IE7, you won't see iestyle.css styling ;)
 
Last edited:
if you feel like you may have done somethig wrong and ie6 is still using the other stylesheet then change href="style.css" to href="style2.css". if ie6 still views as expected but all others just display the text you know the statement has worked correclty.

this is definately the way you have it written? just to make sure you haven't put the condition first then then standard one?

finally if you are still unsure if anything is being changed from the ie stylesheet change something like the body background colour to #ff0000, if this changes it to red in only ie6 then you know it's worked.
 
I've changed it to this below, so it should pick up IE6 and IE7

<!--[if gte IE 6]>
<link rel="stylesheet" type="text/css" href="iestyle.css">
<![endif]-->

That does seem to be working now, i've changed the default style sheet to an old one and i can now see the differences between the two. Thanks for the help guys, i just need to sort it out now lol :D
 
Back
Top Bottom