0
M
a
r
c
h
2
0
0
6
Conditional Comments
Over the past couple of months I’ve frequently encountered little chunks of CSS wrapped in weird little comments, like this:
<!--[if IE 5]> <p>Welcome to Internet Explorer 5.</p> <![endif]-->
I always thought they were just notes for readers. Yesterday I had cause to implement my first Internet Explorer CSS specific code – exploiting the well known ‘star HTML’ bug. However, it’s rumoured that this bug will be fixed in Internet Explorer 7.
But I then discovered that the above code is part of Internet Explorer 5 and above. MSDN has a page about Conditional Comments.

Leave a Reply