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

Tags: , ,

11 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 {

    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:

    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.

  5. Paul Says:

    That did the trick. Thanx alot!

  6. Peter Says:

    You are welcome

  7. chris Says:

    OMG…thank you for this! I really wish IE6 would just die a horrible painful death. (quickly though)

  8. Rakibul Islam Says:

    I was facing the same problem in IE8 and the trick works for me in IE8 also.

  9. Jen Says:

    thank you for posting! works awesome!

  10. PSD Penguin Says:

    omg thank you so much! I was playing around Adobe’s browser lab trying to fix this issue for a good hour! and so all of a sudden i had the idea, “hey ill google ‘extra padding image ie6’ and i came across your blog post.” thanks so much for sharing

  11. Lis Says:

    This is awesome and so simple! You have no idea how long I have been searching for the answer to this bug. Most fixes recommended had no effect. Thank you!

Leave a Reply