Hi,
It can't be done for variable height elements and even in a table you'd need to cater for it explicitly as required.
If the heights are set and you never nest two larger items on the same side it can appear to work but is not a fullproof solution.
Code:
<div style="width:200px;">
<div style="background-color: red; width: 100px; height: 100px; float: left;clear:left"></div>
<div style="background-color: green; width: 100px; height: 200px; float: right;clear:right"></div>
<div style="background-color: blue; width: 100px; height: 100px; float: left;clear:left"></div>
<div style="background-color: orange; width: 100px; height: 100px; float: right;clear:right"></div>
<div style="background-color: red; width: 100px; height: 200px; float: left;clear:left"></div>
<div style="background-color: green; width: 100px; height: 100px; float: right;clear:right"></div>
<div style="background-color: blue; width: 100px; height: 100px; float: left;clear:left"></div>
<div style="background-color: orange; width: 100px; height: 100px; float: right;clear:right"></div>
</div>
You just float one right and one left and clear right and left appropriately.
It's not a real solution though.
The only way to have two columns is to start with two colums and then stack in each column as required.
Bookmarks