Forward thinking floats

The clearfix issue is great to get your divs to behave properly. The one drawback is that you must insert a class=”clearfix” to every element that needs the clearfix attribute applied. This is not forward thinking since if a new method comes along then all of the markup needs to be updated to accommodate the [...]

Clearfix code

This is the famous clearfix code that helps you manage float issues.
Add class=”clearfix” to any container element that holds two items that float left and right. The problem is that most browsers will not give a height to the container element since the floated items will not be counted on as giving height. The [...]