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