<div class="box box-clear"> <div class="float"> float </div> </div> <div class="box"> <div class="float"> float </div> </div>
.box { width: 100px; border: solid 1px #ccc; margin-bottom: 10px; } .float { float: left; width: 80px; height: 50px; background-color: #ff0000; } .box-clear:after { content: ''; display: block; clear: both; }