Вы здесь

css3

display:flex

.sty-fle{
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-flex-flow: row wrap;
flex-flow: row wrap;
}
.sty-ite{
margin-bottom:1em;
display:inline-block;
width:33.333%;
}
.sty-ite:nth-child(3n+1){
background-color:red;
}
.sty-ite:nth-child(3n+2){
background-color:yellow;
}
.sty-ite:nth-child(3n+3){
background-color:lightblue;
}
.sty-h100{
height:100px;
}
.sty-h300{
height:300px;
}

1
2
3
4
5
6


https://www.w3.org/TR/css-flexbox-1/
https://www.w3schools.com/css/css3_flexbox.asp

Подписка на css3