3 column CSS layouts: Easier than you might think
In a recent issue of the Sitepoint Tech Times newsletter, Kevin Yank explains (in detail, with pictures) the recurring problem in CSS of trying to create a three column layout with columns of equal height and a footer spanning all three. If you don’t yet understand the problem, you will once you’ve read his article. Kevin suggests a javascript fix for the problem, but fails to mention that by using floats instead of absolutely positioned divs for the side columns a three column layout with a full width footer can be achieved without resorting to javascript. Pixy’s 3 columns, no hacks demonstrates this technique in action. In addition, the CSS-Discuss Wiki has a comprehensive list of 3 column layouts that demonstrate a number of other techniques for solving the same problem.
Nathaniel - 19th August 2003 17:13 - #
georgec - 19th August 2003 22:35 - #
Tom Gilder - 20th August 2003 15:02 - #
The 3px IE bug is so often a deal-breaker...I find myself using Mark Newhouse's 3 column layout quite a bit, which (a) splits the difference between float and positioning methods and (b) actually lays out correctly in Netscape 4. (not always necessary, but a nice bonus)
It works best if you know that one column is always going to be shorter than the content...although I've been known to force the length of the middle column if just one page doesn't work right.
Elaine Nelson - 20th August 2003 20:27 - #