On Jan 15, 2008, at 8:20 AM, Randal Rust wrote:
> I have always used the good old method of a spacer DIV like this to
> clear floats:
>
> <div class="spacer"></div>
>
> div.spacer { clear: both; }
>
> Problem is, the ad agency that I work with keeps creating these
> complex layouts where using that convention just won't work. The
> reason is that in IE the spacer DIV has a height of about 10 pixels.
> In Firefox, etc. you can get around it by setting the height to 0px,
> but that doesn't work in IE 6 and 7.
>
> So what's the best method to use these days?
There is no 'one-method-fits-it-all'.
options:
* setting overflow:hidden on the element that wraps the floats
* float the element that wraps the floats
* use the 'easy clearing' method documented on PIE
<http://www.positioniseverything.net/easyclearing.html>
more in the Wiki
<http://css-discuss.incutio.com/?page=ClearingSpace>
Philippe
---
Philippe Wittenbergh
<http://l-c-n.com/>
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/