I’m actually pleased with the news that MS is pushing Internet Explorer 8 (IE 8) as an automatic update.
Have you been using or testing your sites in IE 8 yet? If not, you need to be! The numbers aren’t that high yet, but I bet they will –thankfully– be increasing rapidly.
Why thankfully? Well, mainly because IE 8 supports (almost) all of the CSS2.1 specification. For full details check out quirksmode’s CSS Compatibility Chart. This means, in theory, that a single set of CSS can be written and –drum roll please– it will render correctly in IE 8.
Wait! Wait! Wait! Stop the dancing…
Well, for one thing, not every site is well maintained and it may be a while before people get around to updating their code to work in IE 8. This toggle switch may make your site more palatable to new IE 8 users.
Why do they need to update their code, you ask? There are several ways, that we won’t get into here, to get older versions of IE to render ‘correctly’ – meaning: look the same as more compliant browsers. These ‘hacks’ or work-arounds will make IE 8 render incorrectly. Hopefully, your work-around of choice has been to use conditional comments to deliver separate CSS files to IE 7 or older. I have been for a while, so I’m really not able to speak to how to un-hack or add-a-hack your CSS if you’ve been using other methods.
If you have been using conditional comments, simply updating your conditional statements to exclude IE 8 from receiving the custom IE CSS takes only a few seconds. Something like this will do:
< !--[if lte IE 7]-->
Now, to prevent people from using that little IE 7 Toggle Switch and potentially setting your site to always render as IE 7 (and not just for them), add this bit to your document head:
< equiv="X-UA-Compatible" content="IE=8">
This should fix you right up, assuming you’re coding valid HTML and CSS to start with. You’ll still have to deal with IE 6 & 7 for a little bit longer unfortunately, but the light is at the end of the tunnel now.
–“And now,” cried Max, “let the wild rumpus start!” *