<div class="BFC"> <div class="box"></div> <div class="box"></div> </div
.BFC { border: 5px solid #f00; width: 300px; } .box { border: 5px solid blue; width:100px; height: 100px; float: left; }