Grid (Floats)
You can combine display, float, padding, and widths to contstruct a wide variety of fluid grids.
Floats may be set on any element, but it will only affect elements
that aren't absolutely positioned. When you float an element
you inherently set its display to block.
There are only three values that can be declared for float: left, right, or none. These three base classes are very easy to memorize: fl, fr, fn.
.fl
.fr
.fn
Float None
When floats are used for layouts - they need a clearfix solution. This helps prevent
layout problems caused by the elements being removed from the block context of the
surrounding elements.
This example shows two floated elements wrapped in an element with a 4px solid red border.
In the top version where the floats are cleared, the red element wraps around the elements.
In the second example - the parent element is collapsed and the two floated elements sit outside of it.
It should be noted you don't have to clear floated elements that are inside another floated element.
UnCleared Floats
Fixed Columns
Two Columns - Collapsing
Three Columns - Collapse to Single
Three Columns - Collapse to Mixed
Four Columns - Collapse to single
Four Columns - Collapse to Mixed