Previous Message
Next Message

Simple clearing of floats

Sent by Alex Robinson on 1 March 2005 23:11


http://www.456bereastreet.com/archive/200502/simple_clearing_of_floats/

I haven't noticed this mentioned on the list so far, but Roger 
Johansson and others have realised/discovered a method of clearing 
floats (or rather making elements expand to contain their children) 
that is as semantic as the PIE easy clearing method, but much much 
simpler. It also has the advantage that it doesn't inadvertently 
clear any previous floats.

It's as simple as this

..floatclear { overflow:hidden; }
* html .floatclear { height:1%; }


Maybe some massive flaw will be discovered but a close reading of the 
specs looks like this is correct and not a mass-cross-browser-bugfest
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread:

Possibly related: