Re: Float overflowing behavior

On Thursday 2002-08-15 04:09 +0200, Lydia Lalopolis wrote:
> #foo {
>     float:    left;
>     width:    10em;
> }
> #foo:after {
>     content:  " ";
>     display:  block;
>     height:   0;
>     clear:    both;
> }
> 
> No need for such a new property. Just for better browsers. ;)

This shouldn't do what you want, since :before and :after have slightly
misleading names.  The :after pseudo-element generates a last child, not
a next sibling, which is what's needed here.

-David

-- 
L. David Baron        <URL: http://www.people.fas.harvard.edu/~dbaron/ >

Received on Wednesday, 14 August 2002 22:26:55 UTC