Positioning a block under another block (CSS)

Can someone advise me as to a simple way to position a block(s) under a dynamically changing size of a block above it?

IE. I have a block of code positioned “Absolute” that contains text/images that may change in height depending on what goes in to it. There are two other blocks that are each 1/2 the width of this block that (right now) I have positioned “Absolute” directly below the Dynamically changing block. I would like to be able to move the two blocks below the dynamic block up or down depending on the height of the block above it.


If i understood correctly you don’t actually need to use positioning:

.block { width: 200px; overflow: hidden; }
.block .top { /* style stuff */ }
.block .bottom { float: left; width: 50%; }

<div class="block">
  <div class="top">stuff goes here</div>
  <div class="bottom">more stuff</div>
  <div class="bottom">more stuff</div>

This way when ever the top div’s height changes the bottom divs are always snug against the top.

Thanks zbing - Works great

This is a great forum - Thanks again.


Yer welcome!