Fixing the IE Peekaboo Bug

By John Kim | April 1st, 2010    Retweet  

If you are a web developer you understand first hand how miserable IE (internet explorer) can make your life. While trying to format some div elements on a web page, I noticed that parts of the div would disappear anytime I scrolled through a page then magically reappear later. Apparently if you had a div container, and within that container there were floating div elements you would see what is known as the IE IE peekaboo bug. Luckily for me this is a well known and well documented bug so I quickly found my solution for it. Just add this tag to your main CSS stylesheet.


div
{
        position: relative; /* peekaboo bug fix for IE6 */
        min-width: 0; /* peekaboo bug fix for IE7 */
}

And just like that the IE peekaboo bug disappears. I know I will eventually encounter the peekaboo bug in the future and will be coming back to this little fix time and time again. So hopefully this has solved all your problems, and if it did not then I guess you can continue pulling out your hair. I just hope you’ve invested in a good wig.

digg it reddit stumble it facebook
Post to MySpace!
Add this to your blog:
(Copy & paste code)

Leave a Reply

Copyright © 2013 . All Rights Reserved . iCurious Media
Terms and Conditions . Privacy Policy . Site Map