CSS: Conditional Commenting

Post on December 1st, 2006

A common selling point when explaining the benefits of CSS to a client, is that their site will look identical across all platforms Anyone using Internet Explorer 6 however, will soon realize that this is a slight fib.

Fortunately, IE contains a feature called ‘conditional commenting’. Simply make yourself a new IE6 friendly stylesheet, include it in your page as usual and wrap it in a conditional comment to hide it from everything except the guilty browser.

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

From CSS

Comments are closed for this entry.