On 1/26/06, Jonathan Berry <[EMAIL PROTECTED]> wrote:
> Does CSS really suck for multi-column layout?
No.
> O.K. I am having a problem here. We have three columns: right, same size all
> the time, center varies, left, may vary but probably the same size every
> time. So then comes the footer question. In our other sites we have table
> layouts that allow for the footer to stay at the bottom all the time, below
> all columns. But with this, what is the answer?
>
> HEADER
> -------------------------------------------------------------------
> FTCOL CTR RTCOL
> -------------------------------------------------------------------
> FOOTER
Enclose all three columns in a div, call this #container. Enclose
#ftcol and #ctr in another div, call this #wrap. [1] Float #rtcol
right and give #wrap a margin-right equal to the width of #rtcol. So
we have a fixed right column and a remaining space the fills the rest
of the screen to the left. Then float #ftcol left and give #ctr a
margin-left equal to the width of #ftcol (same thing again), or float
both of them left and give them percentage widths that add up to 100%.
Before you close #wrap and #container, add "<br style="clear:both;">.
This ensures that the columns don't flow out of these divs, otherwise
the divs will collapse and you'll be wondering where your background
colors went. Then add "clear:both;" to #footer just for good measure.
Then contact us again so we can help you with IE bugs.
[1]
HEADER
-------------------------------------------------------------------
[ CONTAINER ]
[ WRAP ]
FTCOL CTR RTCOL
-------------------------------------------------------------------
FOOTER
--
--
Christian Montoya
christianmontoya.com ... rdpdesign.com ... cssliquid.com
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/