17th Nov 2005

Posted in

Blog :: Strange IE6 bug

screen shot of bug

I haven't verified this in any other version of IE, but IE6 has a weird bug that breaks pages in spectacular fashion. Basically, pages with an apparently innocuous CSS rule (background-repeat:repeat-y;) end up completely garbled if they are contained in a frame.

"Not a problem for me", you say, "I don't use frames." The problem is that you can't control whether or not your page appears in a frame (outside of using frame busting javascript). Search engines (Google's Image search for instance) may load your page in a containing frame (about.com used to do this, I don't remember if they still do.) If you've got IE6, click here to see a demo of the bug. Otherwise you'll have to be content with the screen shot.

Fixes? Well, allegedly you can fix it by adding a repeat rule for every contained element. That doesn't seem like the way to cleaner simpler markup, however, so I fixed it on the site I was working on by using a very wide background image and not specifying the background-repeat property. This means, of course, that somebody with a very wide monitor would see wrapping... Ugh.


Posted on Nov 17th 2005, 04:13 PM