Nifty CSS trick

I was doing some design work on a new business web site and fighting some alignment issues with Mozilla and Internet Explorer. After a bit of digging I discovered this conditional comment feature of IE 5 and 6.


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

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

This doesn’t solve the problem I’m working on, but I thought this was a neat enough trick. I’m glad I don’t have to deal with design issues like this on a daily basis. It’s frustrating enough to debug simple alignment issues.

2 thoughts on “Nifty CSS trick

Leave a Reply

Your email address will not be published. Required fields are marked *