Solution (Clean Solution)
Date of the Solution
Tue Aug 18 10:37:35 2009
Fixed Versions
All of the affected
Description
This is a "fight fire with fire" kind of bug. We'll be fixing it by explicitly reminding IE that there should be no height on the element along with an extra kick for IE6. Let's see:
Fixed demo is available on a separate page
- HTML Code:
<div></div>
- CSS Code:
div {
height: 0;
overflow: hidden;
background: blue;
width: 100%; /* this is just what we originaly had as "layout" giver */
}
Our markup stayed the same; in CSS we have added height property set to value 0 - this fixes the bug in IE7. Since IE6 is a sufferer of "Expanding Height Bug", we are also adding overflow property set to value hidden to fix the aforementioned bug in IE6.