Re: Using CSS to replace tables for positioning

by Andrew McFarland <aamcf(at)>

 Date:  Tue, 19 Mar 2002 23:06:00 +0000
 To:  <hwg-techniques(at)>
 In-Reply-To:  hwg
  todo: View Thread, Original
At 01:32 18/03/02 +1200, Richard Lake wrote:
>Could some one tell me how I can get the "wanna do" to occur, the #body is
>variable length enclosing whatever text it contains. I want the "wanna do"
>to always follow the #body but to cover the full width of the screen. With
>everything that I've tried it ends up overlaying #body and #navi directly
>after the #logo.

When you use position: absolute you take the element out of the normal flow 
of the document. You want to use position: relative, like so:

#logo {
           height : 100px;
#body {
           position: relative;
           right: 140px;
           top: 0px;
#navi {
           position: absolute;
           right: 20px;
           top: 0px;

The page should be structured like this, with navi inside body:

<.div id="logo">
   <.!-- Content -->

<.div id="body">
   <.!-- Content -->
   <.div id="navi">
     <.!-- Content -->

<.div id="wannado">
   <!-- Content -->

Let me know if this works. I haven't had a chance to test it because my 
computers are all playing up.



HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA