Conditional statements

admin

Administrator
Staff member
How do I add conditional CSS comments in an external style sheet? eg. [[If IE 6]]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.only IE uses conditionalsWell, depending on the type of conditions you want, you could print out a style sheet with PHP (<!-- m --><a class="postlink" href="http://www.php.net/">http://www.php.net/</a><!-- m -->) or some other server side language. Also CSS3 offers some dynamic pseudo classes, but that's only supported in actual browsers.
 
Back
Top