CSS and IE Conditional Comments

August 4th, 2006 by Andrew

Since I’ve upgraded this site to using WordPress, I’ve realized that the page doesn’t display well in Internet Explorer. This is due to my customizations to the stylesheet, mainly to make the site scalable by using ems. By scalable, I mean that for browsers capable of text resizing (ctrl-plus, ctrl-minus (windows) or cmd-plus, cmd-minus (mac)), the whole page will scale, not just the text. This makes viewing the page in different text sizes much nicer, since text doesn’t escape out of its bounding areas.

Internet Explorer didn’t like me using this method, and wouldn’t display the sidebar in the correct location. It would drop all the categories and whatnot to the bottom of the page, below the main content. I recently found an article describing “conditional comments” and how to use them to give IE its very own stylesheet, while keeping every other browser in the dark as to what needs to be overrided for IE.

For those IE-users viewing this site (which, according to my stats, is a large majority), the sidebar should now show correctly. The moral of the story is that IE is an evil, evil, annoying little browser, and causes web developers way too much grief.


There are no comments.

Leave a Reply