Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Nov 2010
    Posts
    27
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Footer/Background Issue

    I am still having difficulties with the footer and the background. I have a layer (Layer1) that is supposed to stretch from the top of the page to the bottom of the page and the footer will be at the bottom.

    However, its not working like that. On two pages (the ones with more text/pictures that go further down the page) the Layer1 doesnt go to the bottom, instead below the layer it shows the background colour. Can anyone help with this?

    Here is my Layer1 coding:

    Code:
    #layer1 {
    position: absolute;
    left: 11%;
    right: 11%;
    margin-left: auto;
    margin-right: auto;
    top: 0px;
    bottom:auto;
    height: 100%;
    z-index: 1;
    background-color: #ed1c24;
    border: 10px solid #ed1c24;
    padding-bottom:10px;
    }

    and here is my footer:

    Code:
    #footer {
    font-size: 12px; 
    text-align: center; 
    background color: #ed1c24; 
    padding: 5px; 
    height: 10px;
    width: 100%; 
    border: 1 px solid #000; 
    visibility: visible; 
    z-index:10; 
    position: absolute;
    top: auto;
    bottom: 0px;
    }
    Heres a picture of the problem.



    It would be much appreciated if someone could help me out.

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,861
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    It would be much appreciated if someone could help me out.
    Can we have a link to your page?
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello davm22,
    Your problem "On two pages (the ones with more text/pictures that go further down the page) the Layer1 doesnt go to the bottom," shows how height: 100%; works.

    100% of the viewing window height... once you scroll past that you are past the 100%.

    ab is right, we need a link.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #4
    New Coder
    Join Date
    Nov 2010
    Posts
    27
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Excavator View Post
    Hello davm22,
    Your problem "On two pages (the ones with more text/pictures that go further down the page) the Layer1 doesnt go to the bottom," shows how height: 100%; works.

    100% of the viewing window height... once you scroll past that you are past the 100%.

    ab is right, we need a link.
    I understand now, I have taken out the height:100% and now it covers the bottom of the 2 webpages. However, on the other pages it doesnt go to the bottom of the screen, only half way up the page (where the text ends).

    Apologies, I dont have a way of showing the website up on the internet just now. Granted, it would be much easier
    Last edited by davm22; 11-13-2010 at 11:29 PM.

  • #5
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    "However, on the other pages it doesnt go to the bottom of the screen, only half way up the page (where the text ends)."

    Yes, that's normal behavior for a div.
    To make a full height layout takes just a little more work. Have a look at this example.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad


  •  

    Posting Permissions

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