shakthi Posted July 19, 2012 Share Posted July 19, 2012 (edited) How can a parent DIV wrap around child DIVs which are floating left or right? Edited July 20, 2012 by Charisma Link to comment Share on other sites More sharing options...
Kami- Posted July 19, 2012 Share Posted July 19, 2012 Exactly that, just insert your floated divs inside the parent div... don't forget about 'clear' and jobs done. Link to comment Share on other sites More sharing options...
Dorza Posted July 19, 2012 Share Posted July 19, 2012 Add the following css to your stylesheet /*CLEAR FIX*/* For modern browsers */.clearfix:before,.clearfix:after { content:""; display:table;}.clearfix:after { clear:both;}/* For IE 6/7 (trigger hasLayout) */.clearfix { zoom:1;}[/CODE] Then add the class "clearfix" to your parent div. Can't remember where I found this so can't give credit but its all over the net in various forms Link to comment Share on other sites More sharing options...
Recommended Posts