Conditional Comments

Conditional comments only work in Explorer on Windows, and are thus excellently suited to give special instructions meant only for Explorer on Windows. They are supported from Explorer 5 onwards, and it is even possible to distinguish between 5.0, 5.5 and 6.0.

A very good article by Quirksmode.org about conditional commenting for MSIE. Since CSS standards aren’t carried well by he various web browsers, not to mention any names, this comes in quite handy. Sadly only Microsoft supports it, but since they’re the ones not following standards (oh wait, I wasn’t going to mention any names, was I?) it works out well. Simply enclose your style sheet call like so:

<!--[if IE]>
<link rel="stylesheet" href="iestyle.css">
<![endif]-->

And then make your corrections/tweaks in that file. I would go more in depth on the matter, the link details it better than I could.

Reference


Tags: , , , , ,

  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

One Response to “Conditional Comments”

  1. IE-Specific CSS says:

    This is also called an IE Specific Style Sheet

Leave a Reply