Page is a not externally linkable
- Code, Content, and Presentation
-- CSS
---- Divs inside divs


rocknbil - 6:58 pm on Sep 29, 2007 (gmt 0)


There are (to my knowledge) three ways to do this.

Clearing div or object as exemplified by Marshall. Unfortunately, a clear will clear to the bottommost corner all objects before it - if you have, say, three columns and attempt to clear an item in the rightmost column, it can clear all the way to the bottom of the longest of the first two columns.

Overflow property as exemplified will often force objects to clear to the bottom of the containing div. You can try overflow:hidden.

Floats within floats is another way, if the above won't work. A floated object will always contain ("shrink-wrap", clear to) all of it's floated children, so if you find yourself in a pickle where clearing or overflow is not working, float the parent object, that will also do it.


Thread source:: http://www.webmasterworld.com/css/3464380.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com