http://www.quirksmode.org/css/condcom.html
Does the term Internet Explorer 6 make you break into a sick, pale sweat? Or is it some old thing on your computer – in fact, hey, what is Internet Explorer 6? In the former case, you’re a web designer. In the latter, you’re one of the awesomely large 30% of websurfers still using IE6 or an earlier version. I know this because my Google Analytics account which monitors the static part of my biggest website, Naturenet, tells me:
Out of 23,000 unique visitors using Internet Explorer that Google picked up last month, a majority were using the most up-to-date Internet Explorer 7.Of the others, well over 9,000 were still using IE6; only sixty-four people were using version 5; and one solitary, spectacularly old skool user was enjoying the features of Internet Explorer 4.01, which was released in 1997. This isn’t far from the norm across the whole web.
So why should I care what my users have on their computers? There’s good reason actually. Different browsers show web pages in different ways. There are common standards, but browsers – especially Microsoft ones – tend to be quite liberal with their interpretation of those standards. What’s more, the older they are, the worse it is. Hence my initial comment about IE6 causing designers nightmares. It’s the oldest browser to still have a significant share of the browsing market, and so if I’m making a page it’s sensible to make sure the page displays properly in IE6 as well as modern browsers. The trouble is, that can be a real pig of a job. For a start, IE6 does all sorts of funny things, which I won’t bore you with. So you need to write special code just for IE6. Furthermore, checking can be a pain, as it means I need to run an old version of IE6, plus the current IE7, and of course Firefox which is my browser of choice (and should be yours). So three different browsers running at once, plus dear old Dreamweaver which does the actual editing.
I’ve gradually worked out a system for doing all this. I now know how to run two different versions of Internet Explorer at the same time. Yes, it’s actually pretty easy – and I’ll be showing you how in a future post. I have also learnt the magic of Conditional Comments – a kind of Microsoft zombie code that slips into web pages and makes apparently normal Microsoft browsers do things, depending on their version.
Conditional comments will be the subject of my next post.