Say we've set up a generic three-column layout for Web pages, which suits our needs for displaying some dynamic content. We might start writing the code for doing that, defining the basic CSS styles and markup, respectively:
As we can see in the above example, a simple three-column layout has been defined using the "float" property to properly position each container <div> element in the document. Following the document structure, the "leftcol" <div> element is floated to the left side, the "rightcol" <div> is similarly floated to the right side, and finally, in a similar fashion, the "content" <div> has been floated to the left, sticking to the "leftcol" <div> element, being displayed nearly the center of the screen. Also, widths for each element have been defined by percentages. It's simple enough and effective to use in liquid designs.
Although we've used floating boxes to achieve the general page layout, other techniques are perfectly valid, such as using absolute positioning and margin specifications. At this point, we have a good three-column design in which each column has the same height. Of course, this case is not a real representation of most Web pages out there. What if we start adding more content to, for example, the left positioned column and a little more to the content <div>? We might see something similar to the code shown below, derived from the initial example:
This spoils the party! As we can appreciate, heights for each <div> element won't be the same and columns will be unequally displayed. We might end up with a visual output like this:
Certainly, this is not what we want for our rendered Web pages, right? Those <div> elements are causing big headaches, and making our pages look pretty unprofessional. What's more, other possible variations to the example might be feasibly implemented. Let's see them in turn, in order to illustrate each of them.