Click to See Complete Forum and Search --> : Conditional statements


nichalp
06-27-2004, 03:16 PM
How do I add conditional CSS comments in an external style sheet? eg. [[If IE 6]]

pyro
06-27-2004, 03:23 PM
You don't. CSS is not a scripting language.

However, you can often use browser's ability (or in IE's case, disability :rolleyes:) to understand certain CSS selectors, properties, etc. to send certain styles to certain browsers. The more you can avoid doing this, the better, though.

IncaWarrior
06-27-2004, 06:41 PM
only IE uses conditionals

Ben Rogers
06-27-2004, 07:30 PM
Well, depending on the type of conditions you want, you could print out a style sheet with PHP (http://www.php.net/) or some other server side language. Also CSS3 offers some dynamic pseudo classes, but that's only supported in actual browsers.