3 ms·
Magic clear:both trick in pure CSS
- jonah 14y agoUnfortunately, the :after pseudo-selector has limited support. :(
- MadRabbit 14y agoit works in IE8, everything below it should die in pain actually, IE8 should die in pain as well :)
- Keithamus 14y agoProblem is the word "should", which isn't "has". Which means this trick doesn't help those of us who have to support IE<=7
- MadRabbit 14y agomy condolences to the poor bastards
- beerweasle 14y agohttp://www.webtoolkit.info/css-clearfix.html http://www.webtoolkit.info/css-clearfix.html
- arcos 14y agozoom:1
- shdon 14y agoSetting overflow:hidden on the container div works all the way back to IE6. The caveat there is that any actual overflow is hidden, which may be unexpected. Things like box-shadows and absolutely position children.
- beerweasle 14y agoclearfix?
- arcos 14y agoThis fix is as ancient as the stars. To deal with <=IE7, simply add the MS propietary zoom: 1. Overflow:hidden is not recommended, because, well it makes things hidden. Also, everyone stop floating everything left to "clear" your floats, it's driving me crazy.
- Boldewyn 14y agoYay! Someone finally invented the clearfix method! Or wait, hasn't someone else done that before? My personal favorite: http://nicolasgallagher.com/micro-clearfix-hack/ http://nicolasgallagher.com/micro-clearfix-hack/
- MadRabbit 14y agoYay! Someone finally invented the being a dick attitude! http://fatkidatcamp.com/wp-content/uploads/2009/11/youre-a-dick1.gif http://fatkidatcamp.com/wp-content/uploads/2009/11/youre-a-d...