Welcome to WebmasterWorld Guest from

Forum Moderators: not2easy

Message Too Old, No Replies

Spacer.gif height="100%" for left navigation

Trying to get left navigation bar to stretch to 100% height

8:11 pm on Feb 4, 2008 (gmt 0)

New User

5+ Year Member

joined:Dec 3, 2007
votes: 0

I have this problem with my left navigation bar. Since every one of my pages is a different height my left navigation bar which has a background color stops. I would like the background color to span the entire height of the page.

What would be the best way to do this? I have tried using the spacer.gif setting height to 100% but this doesn't have any effect. I am familiar with css but not a expert by any means.

If someone could please point me in the right direction it would be greatly appreciated.


2:24 pm on Feb 6, 2008 (gmt 0)

Preferred Member

10+ Year Member

joined:Jan 4, 2003
votes: 5

May be try to add a border-left : [desired width]px, solid, #{desired color}; to your main content area. Then use position : absolute; for your left nav.bar (where width = border-left-width mentioned above).
9:40 pm on Feb 6, 2008 (gmt 0)

New User

5+ Year Member

joined:July 9, 2007
posts: 11
votes: 0

What you can do is to wrap the entire content in a div that has the same background as the left nav. Then, when the other content flows downward your left nav will always be the same size because the div containing all of the content will be the same size as the content.

You may need to create a custom graphic that will be the background of this entire content div to make it look like the left nav div has a colored background because that div won't actually grow with the other div.