Is there a way to force div elements to stack under each other no matter the height?
Currently this happens: http://jsfiddle.net/w974mna9/
div{
width:24%;
margin-right: 1%;
float: left;
margin-top:5px;
}
.one{
background-color:red;
height: 50px;
}
.two{
background-color:green;
height:35px;
}
.three{
background-color:orange;
height:45px;
}
.four{
background-color:magenta;
height:25px;
}
.five{
background-color:black;
height:55px;
}
<div class="one"></div>
<div class="two"></div>
<div class="three"></div>
<div class="four"></div>
<div class="five"></div>
<div class="one"></div>
<div class="three"></div>
<div class="four"></div>
<div class="two"></div>
<div class="five"></div>
The first div that get forced into the next row stacks on the div with the lowest height and the others are pushed down one more row. I want to stack them from left to right in the order they are placed with the variable height indent on their upper siblings.
EDIT:
I don't want them to stack vertically, I want them to stack under each other in a row.