tags:

views:

65

answers:

3

How do i make it so that as the first div expands...the lower div will automatically go lower, due to the height of the first div now is larger?

Is this display? Or Position?

+1  A: 

I would suggest you download firebug and tweak the CSS of your page to make it the way you want it - start playing around with the display attribute.

sdavids
+2  A: 

I'd suggest to use floating elements. This will ensure that the container beneath will always stay below the top container depending on where the top one ends. I.e.:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
<html>
<body>
<div style="height:250; width:250px; background-color:red; float:left;"> TOP </div>
<div style="height:250; width:250px; background-color:blue; float:left; clear:left;"> BOTTOM </div>
</body>
</html>
jnpWebDeveloper
A: 

Use floats. Float the top one left (or right). Set the bottom one to clear left (or right).

tahdhaze09
Or `clear: both;` presuming that he *wants* the second div to be below the first. =)
David Thomas
True! I'm assuming the first div is the content div, therefore it's the top div moving the bottom one...
tahdhaze09