Put them in a table with two cells. (Yes, yes, flame away!)
Added: To clarify: what I meant was this:
<table>
<tr>
<td>
<div>First DIV</div>
<div>Third DIV</div>
<div>Fifth DIV</div>
</td>
<td>
<div>Second DIV</div>
<div>Fourth DIV</div>
<div>Sixth DIV</div>
</td>
</tr>
</table>
Throw in some width and padding settings, and you'll have two neat little stacks.
Now, looking at your examples I think I realized something else yet. You want the <div>
's to arrange automatically in such a way that both stacks are as equally sized as possible. I don't think that's possible.
Well, you might try to render them, and then check their heights with JS, and rearrange them... but this will cause some nasty flickering in the browser.
Added 2: Check the link: http://valts.21.lv/problem/DivStack.html