More Questions Than Answers

Dan Atrill's blog site

Bugged by stylesheets

An image that doesn’t appear, then appears but disappears again? Apparently this is the Peekaboo bug which occurs in version 6 of IE. I found this out after putting an image as a background to a class and looking at it in Firefox. Seemed fine. In IE however, not so good. Blank box.
I searched for some answers and discovered a list of “hacks” including the CSS Holly Hack and amazingly everything came back to life. The trick being to fool the browser with a small height setting for the class using height: 1% A quick Google Peekaboo search shows how many entries relate to this.
There’s also a more complicated version which gets round the problem with Macs too and relates to the element before html which is either a * or > depending on OS. In the stylesheet it would read * html {height: 1%} this same trick will help hide elements from Macs or PCs in the .css file.

Wed, January 26 2005 » Web developing

Leave a Reply

*