Quick Question: How to make firefox ignore line in CSS

Associate
Joined
12 Aug 2004
Posts
1,009
Location
Glasgow, Scotland
Hi there,

Just wondering how I can get firefox/safari etc. to ignore a line in CSS?

Because IE doesn't recognise min-height i need to put in height as well, which i then need to get firefox and other advanced browsers to ignore.

I can remember doing this a while ago but forgot to take a note of it!

Cheers :)
 
Keep all your IE hacks and workarounds in a separate stylesheet, and only serve it to the relevant IE version by using conditional comments.

e.g.
Code:
<head>
...
 <link rel="stylesheet" href="main.css" type="text/css" />
 <!--[if lte IE 6]>
   <link rel="stylesheet" href="ie6.css" type="text/css" />
 <![endif]-->
 <!--[if IE 7]>
   <link rel="stylesheet" href="ie7.css" type="text/css" />
 <![endif]-->
</head>
Pretty much the cleanest way to serve workarounds just for IE :). You can put <style> tags within the comments if you'd prefer.
 
thanks for that, i figured out another way of doing it by simply commenting out the line by placing a double forward slash (//) infront of whatever was needing to be commented.

i still haven't solved my problem though on why i needed to know that, so maybe if you have a spare minute you could have a look at my other thread ?

thanks,

steven.
 
Back
Top Bottom