Connecting Tech Pros Worldwide Help | Site Map

Anchoring a DIV on Expand/Collapse

pbd22
Guest
 
Posts: n/a
#1: Sep 21 '07
Hi.

I have two divs inside a containing div

<div id=container>
<div id=top>
</div>
<div id=bottom>
</div>
</div>

Both the top and bottom divs expand and collapse. The
"top" div has a static position and must stay put. When
it is expanded, it pushes down the "bottom" div to make
room for its content.

Now, I want to anchor the bottom div so, when the top
one collapses, its bottom stays put and the top part
move up, elongating the entire bottom div.

I tried position:absolute; bottom:0 with the bottom div
but, then, it doesn't react to the opening and closing of
the top div.

how do I go about this?

thanks.

Closed Thread