CSS – IE6 Bugs and Hacks: Part Deux

IE6, has for quite some time, been the bane of my existence. It has a deluge of bugs, but it also has some easy fixes for it. Below I have a small list of some of those bugs which don’t have easy and simple solutions but that you should still be aware of.

1. PNG transparency fix link bug:
In my last IE6 bugs and hacks post, I wrote about the common PNG transparency issue. The common javascript fix that is used for this actually causes a problem if you use png images inside of a link. I use this a lot for custom-made rollover buttons (which I implement using a great CSS trick). If a PNG image with transparency is placed inside of an <a> tag with the javascript fix enabled, then IE6 won’t recognize it as a link. Luckily, this actually has a fix! Simply add a "position: relative;" to the image CSS definition and you are good to go!

2. Absence of min-height/min-width:
IE6 does not understand min-height or min-width style definitions for objects. These definitions are often very helpful with dynamic content. There is sadly no fix for this problem. Luckily, this usually won’t cause big problems with your layout. The best you can do is try to avoid the need to use these definitions and you should be fine.

3. :hover only works on a tags with an href
Unfortunately, IE6 decided that the pseudo-class :hover wasn’t useful enough for anything other than links. Obviously, that isn’t always the case. You may want to use it for divs, spans, paragraphs, or any number of other objects. There is no fix for this problem, you’ll just have to live with your hover not working in IE6 and below.

4. Divs won’t maintain a small defined height

This is a really strange one. It seems that if you define a div with a height of anywhere below about 10 pixels, IE6 will force it to 10px (or whatever it magically seems to have selected). This is most likely because it is making room for overflow. There are three fixes that I’ve heard of:

  • Apply a “font-size: 0px;” to the div (which can be a problem if you have copy in the div).
  • Apply a “line-height: 0px;” to the div (which can also be a problem for the same reason above).
  • Apply a “overflow: hidden;” to the div which should remove the overflow problem.

Now that all of that is over, Internet Explorer 8 has just been released post Beta. This couldn’t be more frustrating for me seeing as right now there are 3 active version of IE out there. Last time I checked IE has about 50% of the browser market, and within that, IE6 had about 20%, IE7 about 70%, and IE8 the remaining 10%. Slowly this will all shift, but it’ll be at least another year before I’d even consider not testing in IE6 anymore. Sadly that means for at least a year I’ll be testing three frickin versions of Internet Explorer. FRICK! Good luck to you all :).

Comments are closed.