Bailing Your Boat: Clearing Problem Floats

,

Floats can be incredibly frustrating when they don’t work as you expect and they often don’t. The normal way allows for you to create drop caps, meaning the floated element sticks out beyond the borders of the containing box. Usually, though, you don’t want that when building web layouts and there are better ways to fix it than by adding an element with clear:both; Here’s one good method and a comprehensive list of links on the subject.