If I get what I ask for, I will never use another table for layout purposes ever. I swear on your grave (this is to align the incentives properly). I want a CSS 3-column layout that does all of the following:
- Puts the content
div
first. - Allows the content
div
to expand. - Is fluid (i.e., if the browser window expands, so does the width of the page).
- Allows me to fix the width of the outside columns.
- Has a header and footer that expand the width of the content plus two columns.
- There must be no space among the columns or between the columns and the header or footer.
- I must be able to specify different background colors for the header, the footer, and each of the three columns.
- It must not rely on images to make the effect occur (bandwidth, people–plus I need to be able to edit this sucker without Photoshop).
- It must be pixel-perfect on IE 5.5+, Safari 1.0+, and Mozilla 1.0+ (and associated browsers using that version of Gecko).
- It must be legible in IE 5.x for Mac.
- The content of each column must align to the top at least.
- The column background colors must extend to the bottom of the page.
- Oh, and one more thing: it must not matter which column is longest.
That’s it. That is trivial to do with a single table (styled, of course, with CSS), but I’ve been searching several resources and I can’t find one that does all of that. Remember, the solution must hit each and every one of those points or I just can’t replicate the designs I get in Photoshop, and asking me to get the designer to change or the project manager to understand or the client to accept limitations does no good–trust me, I’ve tried.
I don’t even require that I be able to vertically center or bottom-align the content. Top-aligned is fine. It doesn’t have to work in Netscape 4.x. It doesn’t have to work in IE 5.0. I can give all that up in return for giving up the necessity of left-to-right ordering of tables plus their misleading semantics.