Internet Explorer suck. I have yet a new reason. Well, new for me. I did not know that IE would fail so incredebly.
So here is the scenario. I have created a very simple and small site for a customer that relies heavily on Twitter Bootstrap. It looked good in Chrome and the others as you would expect. I use Arch Linux so testing a site in IE is something I need to make an effort to get done so I had not done that yet. I was no surprised when I got a mail for the customer saying the site did not look good in IE. I actually expected it (then agian I didn’t since I thought Bootstrap would take care of most of it and as it turns out it actually did). And the customer has right. It looked awful! And then it hit me that I had forgot the html5-shiv that makes html5 elments be rendered by IE.
But after adding this is actually look worse! That made no sense at all! I searched and googled but found no good explenation for this. I checked the Bootstrap web page and it worked like a charm in IE8, even without the shiv. After some head scratching and some minutes as a living question mark I started to suspect that this might be a rendering problem. The CSS did not work properly. I can not quite remember how I got to think about it but I checked the docype and then I saw the problem. The bang (!) was missing in the tag!
Like so:
1
| |
Correct version:
1
| |
I knew what was right but some how ignored it. The reason it took so long time to notice it is that all the other browsers rendered it correct event if this little, but very important detail was wrong. IE on the other hand failed miserably. This browser still amazes after so many years of common knowledge of its incompetence.
Well, now you know this little bit of technological fact about browsers and doctypes. And if you already knew you now know that I know. Ain’t that neat? ;)
