Hi Phil,
Egor is correct except that there is a neater way of doing this.
Code:
.clearer{
height:1px;
overflow:hidden;
clear:both;
margin-top:-1px;
}
Then add this code exactly here (must be exactly here):
Code:
bbbbbbbbbbb bbbbbbbbbbb bbbbbbbbbbb bbbbbbbbbbb bbbbbbbbbbb bbbbbbbbbbb
bbbbbbbbbbb bbbbbbbbbbb bbbbbbbbbbb bbbbbbbbbbb bbbbbbbbbbb bbbbbbbbbbb
</div>
<div class="clearer"></div>
</div>
<div id="footer"> <span id="footerleft">Copyright 2004 Phil Freo</span> <span id="footerright">Website
That will enable mozilla to extend its background around the float because floats are removed from the flow and should flow out of the parent according to the specs. Clearing the float before the parents closing div allows the parent to extend and encompass the float with some real content.
Charles's solution above is partially correct in that the background appears because you have some content that is not floated and therefore the parent is stretched with the content. However if the left column were longer then the left float would spill out of the container and the background would not extend.
Therefore if you use charles's version then you still need the clear fix above anyway.
Hope that helps.
Paul
Bookmarks