<div class="wrapper1"> <div class="box1"> </div> <div class="box2"> </div> <div class="box3"> </div> <div class="box4"> </div> </div>
.wrapper1 { width: 500px; height: 200px; background: green; } .box1 { width: 100px; height: 100px; background: red; float: left; } .box2 { width: 100px; height: 100px; background: blue; float: left; } .box3 { width: 100px; height: 100px; background: yellow; float: right; } .box4 { width: 100px; height: 100px; background: purple; float: right; }