Forum Moderators: not2easy
It appears that IE adds padding to both top and bottom of the container div, when holding a floated div.
<style>
div#content { padding:20px 0 0 0; border:1px solid blue}
.clear {height:0; line-height:0; clear:left;font-size:1px}
</style><div id="content">
<div style="float:left;">
<div><img src="" width="100" height="10" alt="" />
</div>
</div>
<div class="clear"> </div>
</div>
If you change the 20px top padding to 0 it works, but adding the 20px back in, gives padding to bottom as well as the top, not just the top as you would expect.
<style>
div#content { padding:0px 0 0 0; border:1px solid blue}
.clear {height:0; line-height:0; clear:left;font-size:1px}
</style><div id="content">
<div style="float:left;">
<div><img src="" width="100" height="10" alt="" /></div>
</div>
<div class="clear"> </div>
</div>
Removing the float, makes everything work properly. unfortunately, I need the float for my application (tho for this simple example it is pointless).
Any ideas? Anyone?
thanks,
skube