IE6 Image WhiteSpace Bug

Something that really gets me out of my skin is this silly bug. I often need some area with no padding, no margin or any other space bellow the image that is contained in it. Here is how it looks before and after applying the fix :

Internet Explorer Image WhiteSpace Bug

Fix description: Just add font-size:1px; in the definition of the area’s style

Preview of the bug and the fix

  • Digg
  • Facebook
  • del.icio.us
  • StumbleUpon
  • LinkedIn
  • Technorati
  • Slashdot
  • Google
  • Furl
  • Reddit
  • SphereIt
  • Spurl
  • YahooMyWeb

Tags: , ,

4 Responses to “IE6 Image WhiteSpace Bug”

  1. Igor Says:

    Surely an unnerving bug, but it can be worked around with a simpler solution than this one. If, for example, we have an image that sits in a table or a div, that it is not supposed to stretch vertically, you can just add the simple CSS rule like that:

    #holder_id img {
    display:block;
    }

    This won’t do if you have an image surrounded by text, because the text wouldn’t flow around the image. But in this case, I guess, you can put up with a little extra space below.

  2. John Says:

    Thanks for the tip! This really helped me with the tabs and the pinstripe alignment on my site.

  3. Peter Says:

    @John
    No problem. If you have some links section on your sites and think others may like the site - put a link to here.

  4. Jon Says:

    Thanks guys you saved me a lot of hair pulling.

Leave a Reply