Blah Blah Blah CSS.
As I've been using advanced / standard CSS to design entire pages, I've encountered many a head-banging moment caused by IE's odd rendering of a standard bit of code. The issues can usually be patched, but doing often breaks other browsers like Firefox and Opera. For weeks, I've been pining for a way to corral my IE hacks without going back to the bad old days of fiddly JavaScript browser detection.
Lo and behold, conditional comments! Apparently these have been known about for quite a while. (Doh! They're not mentioned in Web Design in a Nutshell or Bulletproof Web Design.) But it seems so delightfully useful to me, that I must evangelize it here.
Here's the deal. Anything inbetween these comments will only be executed for IE5.5. So, you can put your special IE hacks/patches in that external CSS file!
<!--[if IE 5.5]>
<link rel="stylesheet" type="text/css" href="ie55.css" />
<![endif]-->
- Arve Bersvendsen's Overview and Examples
- Conditional Comments for Every Version of IE
- Microsoft Explains Conditional Comments
This is so awesome. Especially in light of the chatter that Microsoft may push-release IE7 over Windows Update. They have kindly posted a list of IE7's new CSS fixes.
Permalink
Tags: code css htmlAuthorized users may log-in to leave a comment.