Problem with floating element
Code
Index
<div style="background:salmon; padding:1em; border-top:1px solid red;">
<div style="float:left; width:50px;height:50px;background:olive;"></div>
<span>Anatoliy</span>
</div>
<div style="background:salmon; border-top:1px solid red;">
<div style="float:left; width:50px;height:50px;background:olive;"></div>
<span>Anatoliy</span>
</div>
Solution 1. Extra div bellow with clear:both
Solution 2. Float the parent container
Solution 3. Parent container with overflow:auto