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
Me need pictures. But I think you mean the divs are growing upwards instead of downwards like normal?
OK I put picture as an example of what I need to do. I think everything is clear for understanding if you look at it. My problem is to make div1 follow div2 as in the picture. Thanks
Hmmm... methinks you'd need Js to first shrink div2, and then add the exact amount subtracted from div2 and add that as maybe top margin for div 1. I say this because generally, a webpage and css use the top and left sides for reference most of the time. Simply saying there can be no increasing of space between the two divs wouldn't be enough to drop the div1 down, because it's not actually sitting on div2. Instead, div1 is hanging from it's top and left sides (assuming no absolute positioning or floats), so whatever happens below it, it will generally ignore. I'm not 100% sure on this, as I'm not yet a Crusty Old Guy Who Knows Stuff.