Welcome to WebmasterWorld Guest from 54.146.174.220

Forum Moderators: not2easy

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)

5+ Year Member



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.

Thanks,
David

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

10+ Year Member



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)

5+ Year Member



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.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month