I’ve just been looking at a ‘broken’ site in IE7 and helping a friend diagnose what the problems are. I think people tend to assume that if a site renders happily in a bunch of different browsers, but has problems in IE7, then the browser is bad. The default response is then to add some hacks to make IE7 work correctly.
This is a bad way to go. Each problem that I’ve looked at so far, IE7 is actually rendering correctly based on the instructions it understands. We just fixed a big layout problem where the root cause was a container div not stretching to contain it’s floated children. However this was the correct behaviour. Based on the instructions that IE7 had parsed and understood, it was rendering correctly.
The fact that those instructions didn’t arrive at the desired layout was the problem, not the browser rendering. By taking the time to diagnose the problem and understand why it was rendering in a certain way, you can solve the root issue rather than adding a new layer of hacks on top of broken instructions.
Generally IE7 will behave in a very logical way – it’s really worth taking the time to figure out why something looks wrong, rather than jumping straight in and hacking.
UPDATE: the particular issue we were looking at was how to get an element to contain it’s floated children. This has been discussed already on 456 Berea Street and Malarky.
