Results 1 to 3 of 3

Thread: CSS Sidebar: Background Needs to Extend to the Page Bottom

  1. #1
    Join Date
    May 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default CSS Sidebar: Background Needs to Extend to the Page Bottom

    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;

    }

  2. #2
    Join Date
    Feb 2007
    Posts
    293
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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%;
    }

  3. #3
    Join Date
    May 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you for the reply. I can't believe it was so obvious!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •