This website may use cookies. More info. That's Fine x
Welcome Login

IE conditional comments


css2
Eg: to minimize errors in IE, Microsoft has implemented conditionnal comments in their browser, which allow you to link a style.
<!--[if IE]>
<link href="ie.css" rel="stylesheet" type="text/css" />
<![endif]-->

You can also target only a certain version of IE:
<!--[if IE6]>
<link href="ie.css" rel="stylesheet" type="text/css" />
<![endif]-->


Eg2:
<!--[if IE 8 ]><body class="ie6"><![endif]-->
<!--[if IE 9 ]><body class="ie7"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <body> <!--<![endif]-->

Created on: Friday, February 18, 2011 by Andrew Sin