by Kyle Weems 12.March 2008 08:23
In the web-o-sphere there is a shuddering, stitched together behometh that continues to plague the fair inhabitants of the sleepy village of Developerville. Brought to life through mad science and poorly conceived plans, it mindlessly flails through the website countryside, demolishing standards-oriented designs and beautiful layouts with its hamfisted attempts at proper behavior. Although I'm rarely a mob leader, there are times where I want to grab a torch, yell some rhetoric and finish the beast off once and for all.
I am speaking, of course, of Internet Explorer 6. Released on August 26, 2001, IE6 has managed to crouch upon the midden heap of browser usage for over half a decade, ruling over the Internet with a reign of terror. A standards nightmare, the browser is the constant source of developer frustration with poor CSS implementation, unique javascript quirks, and any other number of issues I've yet to stumble across. I would gladly encourage developers to ignore this thorn in our side and move forward, embracing the future. But, infuriatingly enough, it appears at least a third of web users are STILL using the monster, despite the release of IE7 well over a year ago (the statistics I'm using in this case are from w3schools.com, which usually shows a lower level of IE usage than other statistic sites due to the popularity of other browsers with developers).
I've talked a bit about this monster in the past, mostly in complaint, and for good reason. An absurdly large portion of my job is to review a website in IE6 after we've finished it, cry a bit when I see what horrible things have been done, and then try to fix them. One could say that over the past year I've become quite experienced in picking out the source of various rendering issues and correcting them. Yet, despite this, not a month goes by that I don't find myself confounded by some unexpected hurdle that results in me considering how early one can acceptably visit the bar across the street.
On a current project, I came across a new problem (well, new to me) when I encountered a vertically stacked menu (it's always menus) of buttons that had margins between them that was working incorrectly when viewed in The Black Beast of Redmond (IE6 for those not following my metaphors). As I'd move the mouse over the various anchors, the margins would briefly appear or disappear, causing a humorous yet maddening sort of flickering as the menu's pieces popped around like Mexican jumping beans (where can I find such magical beans, by the way?)
An old hand at spotting IE6 issues at this point, I immediately expected the problem to be coming from anchor pseudoclass issues (which is a subject for another day). However, after ensuring that every :hover, :visited, and so forth was accounted for, the margins continued to pop on and off as they pleased. I tried all sorts of mystic rituals of CSS, using various positioning types and other less useful styles, only to discover in the end that nothing was making those margins behave.
So the time for research came, and after a good deal of Googling, forum-hopping, and blog-reading I stumbled across this. The short version is that when a container has hasLayout, the children at the top and bottom of the container have their margins ignored. On the project I was working on, the anchors (which had the margins arbitrarily disappearing) were each nested in a LI. The LI's each had hasLayout, and thus, none of the margins were working.
The solution came easily enough, as I moved the margins to the LIs instead of the anchors (which may have been wise to do in the first place). But the fact that I'm having to continue to work around hasLayout is slowly driving me to the lynch mob point. For the love of all that's ,please upgrade IE on your computers, people. I know you're scared of change. I know big companies don't want websites to break internally, and so their tech groups are frozen in the past. But as even Microsoft is embracing standards now, perhaps you should make the move with them. It won't be painless, but ultimately I'll be spending less time debugging sites, which means ultimately you'll be spending less money getting them made.
Bad IE6. No cookie for you.