Previous Message
Next Message

Re: [css-d] Fluid two-column layout in CSS?

Sent by Andrew Clover on 13 February 2002 18:06


Scott Sauyet [EMAIL-REMOVED]> wrote:

> The problem with this is that the text nav should be at the bottom of 
> the page, regardless of whether the main contents or the main navigation 
> is longer.

In this case the columns must not be absolutely positioned, as then they
would 'take up no space', and you hence you couldn't put something underneath
them. You need a combination of static and floating columns, with the lower
nav in a div with 'clear'. eg. with two floats:

  <div class="nav" id="topnav">...</div>
  <div id="tree">...</div>
  <div id="content">...</div>
  <div class="nav" id="botnav">...</div>

  #tree    { float: left; width: 30%; }
  #content { float: left; width: 70%; margin-right: -1px; }
  #botnav  { clear: left; }

(The -1px right margin is to work around rounding errors in IE when multiple
%-width floats are used.)

-- 
Andrew Clover
[EMAIL-REMOVED]
http://and.doxdesk.com/
Previous Message
Next Message

Message thread:

Possibly related: