Friday, August 04, 2006

IE Escaping Floats Bug

we were having a problem with IE. When the page was first displayed, some of the text was not visible. After moving the scroll bar or mousing over the text, it became visible.

The is the result of a known bug with Internet Explorer that can be addressed by the famous Holly Hack, described in the following website.

IE Escaping Floats Bug: "The Holly Hack

In fact a height can be given to IE/win and not affect the displayed height of the container. This is possible because IE has another non-standard behavior concerning boxes and dimensions. When IE/win sees that a box has a stated dimension that is not large enough to enclose the content of the box, IE/win goes ahead and wrongly enlarges the dimension so that the content does not overflow the box borders.

You might think this is a good idea, but if the box is a float and it gets enlarged beyond its stated size it may be forced to drop down the page to where it has more room, wrecking the layout.

Anyway, Since IE/win will behave this way, a very small height can be applied to the container and IE/win will just make the box taller anyway. Thus a small height does not change the appearance of the box, but the escaping floats bug is fixed!"

0 Comments:

Post a Comment

<< Home