CSS3列はあなたが探しているものです。これがサンプルのHTMLです。
<div class = "container">
<div class = "entry">Glee is awesome!<br/>1</div>
<div class = "entry">Glee is awesome!<br/>2</div>
<div class = "entry">Glee is awesome!<br/>3</div>
<div class = "entry">Glee is awesome!<br/>4</div>
<div class = "entry">Glee is awesome!<br/>5</div>
<div class = "entry">Glee is awesome!<br/>6</div>
<div class = "entry">Glee is awesome!<br/>7</div>
<div class = "entry">Glee is awesome!<br/>8</div>
</div>
CSS:
.container {
height: 230px; /*2 * 100 + 3 * 10*/
width: 450px; /*2 * 400 + 5 * 10*/
-moz-column-count: 4;
-webkit-column-count: 4;
column-count: 4; /*4 columns*/
}
.entry {
height: 100px;
width: 100px;
margin: 10px;
background-color: rgb(0, 162, 232);
color: white;
font-family: 'Arial', Helvetica, Sans-Serif;
text-align: center;
font-weight: bold;
}
そして少しのデモ:少しのリンク。
お役に立てば幸いです。