Developer Nick Salloum has an interesting article on ‘Clearing Floats: An Overview of Different clearfix Methods' on SitePoint.
This explains the problem as well as looking at the solutions. Useful and instructive!