Let\'s say I have a div which will contain a set of elements (divs), which may have different heights, but all of them will have the same width.
I\'ve a
If your layout is always going to be 3 columns wide, you could try using the nth selector on your internal divs.
You could do this by clearing your 4th item.
#container {
overflow: hidden;
width: 440px;
}
#container div {
background-color: gray;
width: 110px;
margin: 5px;
float: left;
}
#container div:nth-child(4) {
clear: both;
}
1
2
3
4
5
6
7
8
JS Fiddle