Page is a not externally linkable
- Code, Content, and Presentation
-- CSS
---- div column layout


designaweb - 11:10 am on Aug 14, 2009 (gmt 0)


I am trying to work out whether what I want is possible, and after trying and trying, I haven't found the solution. My last resort, as always, is to ask for help.

Here's the (relevant) HTML code:


<div id="container">
<div id="b1">block 1</div>
<div id="b2">block 2</div>
<div id="b3">block 3</div>
<div id="b4">block 4</div>
</div>

Now, without changing the order of the DIV's in the HTML, is it possible to:

- Display "block 2" and "block 4" on the left hand side
- Display "block 1" and "block 3" on the right hand side

The widths of all blocks are known, all heights are variable. I know I could use subcontainer divs, but I need to keep the HTML *exactly* the same to what it is right now. Is my layout possible with the sole use of CSS?


------------------------------------
¦........................¦.........¦
¦......block 2...........¦.block 1 ¦
¦........................¦.........¦
¦........................¦.........¦
¦------------------------¦.........¦
¦........................¦.........¦
¦......block 4...........¦---------¦
¦........................¦.........¦
¦........................¦.block 3.¦
¦........................¦.........¦
¦........................¦.........¦
¦........................¦---------¦
¦........................¦
¦........................¦
¦........................¦
¦........................¦
--------------------------


Thread source:: http://www.webmasterworld.com/css/3971825.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com