Possible Duplicate:
How to stack divs from top to bottom in CSS
When i have multiple adjacent divs with float:left
, they stack like this:
_______
| 1 2 3 |
| 4 5 |
|_______|
I want a stack like this:
_______
| 1 4 |
| 2 5 |
|_3_____|
jsFiddle with the horizontal stacking
How can i achieve vertical stacking ?
@ pinouchon; for this type of layout you can use css3 column-count property
for this.
CSS:
div#multicolumn1 {
-moz-column-count: 2;
-moz-column-gap: 10px;
-webkit-column-count: 2;
-webkit-column-gap: 10px;
column-count: 2;
column-gap: 10px;
}
Check my example here for more How to stack divs from top to bottom in CSS
read this article for more http://www.quirksmode.org/css/multicolumn.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With