Forum Moderators: not2easy

Message Too Old, No Replies

Nested AP Divs not expanding

Need how to help :-)

         

sage

3:13 am on Jun 19, 2009 (gmt 0)

10+ Year Member



I want to have an area surrounded by a border. In the area I want 2 columns (no border). I set up an AP Div with a border and 2 nested AP Divs within it.

Thr nested AP Divs expand as they should, but the principal AP Div does not expand automatically to accmodate bigger nested AP Div.

What am I doing wrong?

swa66

11:01 am on Jun 19, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



An absolutely positioned block element will expand for it's content by default, but an absolutely positioned element isn't part of the flow inside its parents anymore, so it will not stretch a parent in any way shape or form.

There's nothing you can do except not use absolute positioning on the inner divs.

For columns it's populae to use floats (and then add a clearing under them (a simple line break or "clearfix" (take care with the hacks most examples contain)) or to start to use CSS3 and fall back on a single column for browsers not yet ready to support that.

sage

2:34 pm on Jun 19, 2009 (gmt 0)

10+ Year Member



Thank you for the insight.