#div0 { width: 100%; height: 500px; } #div0 div { float: left; height: 100px } #div0 div:nth-child(1) { background-color: aqua; } #div0 div:nth-child(2) { background-color: red; } #div0 div:nth-child(3) { background-color: green; }