As we all know by now, Internet Explorer is real pain for designers and developers. And it does cause them severe health problems. Some recognisable symptoms are; unaccountable rage, gibbering incoherently, rocking backwards and forwards in the foetal position and extreme cursing of Bill Gates.

Of course the problem lies with how the various versions of Internet Explorer don’t follow the same standards as most other browsers. A common way of dealing with this is to use IE Conditional Comments. They can be used to target specific versions as in the examples below:

<!-- For IE 6 -->

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

<!-- For IE7 and below -->

<!--[if lt IE 8]>
<link href="ie7.css" rel="stylesheet" type="text/css" />
<![endif]-->

<!-- For IE8 or above -->

<!--[if gte IE 8]>
<link href="ie8.css" rel="stylesheet" type="text/css" />
<![endif]-->

However, often there are only one or two bits of code in these stylesheets. If this is the case there is a neat little trick to save you all the hassle of setting up multiple versions of your CSS. This involves simply writing IE specific rule in your main CSS code.

/*Here’s how it works*/

.box{
background: yellow; /* Standard */
background: red9; /* IE 8 and below */
*background: green; /* IE 7 and below */
_background: blue; /* IE 6*/
}

Though this is not the cure for Ieophobia I do hope that it might go some way to relieve some of the symptoms.