Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 20th, 2005, 09:31 PM
Jeff Butler
Guest
 
Posts: n/a
Default div tag positioning issues

Hi

I'm coding a page which has the following layout.

<div id="header">
header
</div>
<div id="navigation">
navigation
</div>
<div id="content">
<div id="column one ">column one</div>
<div id="column two">column two</div>
<div id="column three ">column three</div>
</div>

The issue arises because the header of the site needs to grow and contract
with the content in it, so I can't give column's one two and three absolute
positions because these change with the height of the header, I have tried
giving each a relative position with a negative top value, which positions
everything in the right place and the content moves up and down with the
header, but this results on a lot of extra white space at the bottom of the
page.

If anyone has got any solution, ideas I would be indebted.

Cheers Jeff


  #2  
Old July 20th, 2005, 09:31 PM
David Dorward
Guest
 
Posts: n/a
Default Re: div tag positioning issues

Jeff Butler wrote:
[color=blue]
> The issue arises because the header of the site needs to grow and contract
> with the content in it, so I can't give column's one two and three
> absolute positions because these change with the height of the header[/color]

Put them inside a container in normal flow (i.e. so it sits after the
header) and position them inside that (i.e. by utting position: relative on
the container).

--
David Dorward http://dorward.me.uk/
  #3  
Old July 20th, 2005, 09:31 PM
Stephen Poley
Guest
 
Posts: n/a
Default Re: div tag positioning issues

On Wed, 8 Oct 2003 14:12:53 +1300, "Jeff Butler" <jeffis@itagain.co.nz>
wrote:
[color=blue]
>The issue arises because the header of the site needs to grow and contract
>with the content in it, so I can't give column's one two and three absolute
>positions because these change with the height of the header, I have tried
>giving each a relative position with a negative top value, which positions
>everything in the right place and the content moves up and down with the
>header, but this results on a lot of extra white space at the bottom of the
>page.
>
>If anyone has got any solution, ideas I would be indebted.[/color]

Use floats. I have a couple of example layouts on my site (see sig) that
might offer some inspiration.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
  #4  
Old July 20th, 2005, 09:32 PM
Jeff Butler
Guest
 
Posts: n/a
Default Re: div tag positioning issues

Hey Stephen,

Thanks for your help, that worked perfectly.

Cheers Jeff


"Stephen Poley" <sbpoleySpicedHamTrap@xs4all.nl> wrote in message
news:bgi7ov0v8hd6jvhbkpnhuhip80nbjjcvdm@4ax.com...[color=blue]
> On Wed, 8 Oct 2003 14:12:53 +1300, "Jeff Butler" <jeffis@itagain.co.nz>
> wrote:
>[color=green]
> >The issue arises because the header of the site needs to grow and[/color][/color]
contract[color=blue][color=green]
> >with the content in it, so I can't give column's one two and three[/color][/color]
absolute[color=blue][color=green]
> >positions because these change with the height of the header, I have[/color][/color]
tried[color=blue][color=green]
> >giving each a relative position with a negative top value, which[/color][/color]
positions[color=blue][color=green]
> >everything in the right place and the content moves up and down with the
> >header, but this results on a lot of extra white space at the bottom of[/color][/color]
the[color=blue][color=green]
> >page.
> >
> >If anyone has got any solution, ideas I would be indebted.[/color]
>
> Use floats. I have a couple of example layouts on my site (see sig) that
> might offer some inspiration.
>
> --
> Stephen Poley
>
> http://www.xs4all.nl/~sbpoley/webmatters/[/color]


 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles