Pew Pew Laser Blog

Code. Glass art. Games. Baking. Cats. From Seattle, Washington and various sundry satellite locations.

Pew Pew Laser Blog Archives — by Blog ID

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 in-between 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" />

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.


Tags: code css html

Authorized users may log-in to leave a comment.

Last Blog: More Bitching.

Next Blog: Hooked on The Office.