Forum Moderators: not2easy

Message Too Old, No Replies

Making div to drop down when div beneath it change it's height dimensi

         

gitarista

5:20 pm on Oct 15, 2007 (gmt 0)

10+ Year Member



OK,I will try to be as clear as possible.
I have one div (container) 500pix height containing two another divs in it. One of them is 200 height and another one that is on bottom is 300. Now if I manually change dimension of div that is on bottom to 200 pix, I want the one that is on top to get down as much as it can (so it's 100pix in this case) to the top of the one div that is on the bottom.
So if you understand me I want to make the position of the div that is on the top to depends on the height dimension of the div that is on the bottom, and to always drop down to it so they touch each other.
I need this for some javascript programming...
Thanks

gitarista

6:45 am on Oct 16, 2007 (gmt 0)

10+ Year Member



OK I put picture as an example of what I need to do. I think everything is clearer for understanding now just if you look at it. My problem is to make div1 follow div2 as in this picture. Still searching for a solution...
<snip>

[edited by: engine at 2:53 pm (utc) on Oct. 16, 2007]
[edit reason] No urls, thanks, please post code [/edit]

Marshall

7:36 am on Oct 16, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



gitarista. Welcome to WebmasterWorld.

Just so you know, the posting of url's is against TOS.

For what you want to accomplish, you will have to use javascript. However, why are you not simply using fluid heights in the <div>'s by not assigning a fixed height?

Marshall