PDA

View Full Version : CSS Sidebar: Background Needs to Extend to the Page Bottom



Tiffany
05-10-2007, 07:30 PM
Hello all. I've been having some issues getting the background image for my CSS sidebar to extend to the bottom of the page. I've noticed that the length of that background image depends on how much material I have in the #main section of my page, if that has anything to do with it. If it helps, this is the CSS I used for the sidebar:

#nav {
width: 25%;
float: right;
padding: 2px;
background-image: url(images/background.jpg);
background-attachment: fixed;
float: right;

}

Veronica
05-10-2007, 08:04 PM
To the div you would add

height:100%;

But you also need to set the height to 100% for the parent container. So if the parent container was the body, you would need

body {
height:100%;
}

Tiffany
05-11-2007, 03:06 PM
Thank you for the reply. I can't believe it was so obvious!