Monday, October 29, 2007

Conditional Comments

Ever heard of conditional comments? Well, I hadn't - but they might be the perfect solution to tackling the idiosyncrasies of IE when dealing with CSS.

I have to delve into them further - particularly - using expressions within a style declaration (such as on the Burrp sign-up page).

Usage:

<!--[if IE 6]>
Special instructions for IE 6 here
<![endif]-->


I would recommend putting this and the entire link statement for your standard stylesheet in a separate file such as style.jsp or style.php and then use it as an include.



Also, if you are using multiple IEs for testing, the conditional comments won't work - however, they will in actual practice.