Holy Grail of CSS 3-column layout

While researching ways to make HTML/CSS code ripe for SEO (search engine optimization, I just love this acronym), I came across a new article on A List Apart:


Three columns. One fixed-width sidebar for your navigation, another for, say, your Google Ads or your Flickr photos—and, as in a fancy truffle, a liquid center for the real substance. Its wide applicability in this golden age of blogging, along with its considerable difficulty, is what has earned the layout the title of Holy Grail.

Many articles have been written about the grail, and several good templates exist. However, all the existing solutions involve sacrifices: proper source order, full-width footers, and lean markup are often compromised in the pursuit of this elusive layout.

A recent project has brought my personal grail quest to an end. The technique I’ll describe will allow you to deploy the Holy Grail layout without compromising your code or your flexibility. It will:

  1. have a fluid center with fixed width sidebars,
  2. allow the center column to appear first in the source,
  3. allow any column to be the tallest,
  4. require only a single extra div of markup, and
  5. require very simple CSS, with minimal hacks patches.

Keep Reading…