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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Apr 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    problem with putting footer in the bottom of the page

    I have got problem putting the footer in the bottom of the page. Footer goes upward. The CSS code of the footer is:

    #footer
    {width:1002px;
    height:105px;
    margin-bottom:0px;
    bottom:0px;
    float:left;
    background-image:url(HOSPITAL_07.gif);
    background-repeat:repeat-x }

    How can I solve the problem??

  • #2
    Senior Coder alykins's Avatar
    Join Date
    Apr 2011
    Posts
    1,776
    Thanks
    41
    Thanked 196 Times in 195 Posts
    your "bottom:0px;" needs to have a position: relative||absolute set before it will work (I'm 90% sure)

    I code C hash-tag .Net
    Reference: W3C W3CWiki .Net Lib
    Validate: html CSS
    Debug: Chrome FireFox IE

  • #3
    Senior Coder
    Join Date
    Apr 2011
    Location
    London, England
    Posts
    2,120
    Thanks
    15
    Thanked 354 Times in 353 Posts
    Quote Originally Posted by alykins View Post
    your "bottom:0px;" needs to have a position: relative||absolute set before it will work (I'm 90% sure)
    That's right: if you add 'position:absolute;' and keep the 'bottom:0px;' the footer will pop to the bottom of its parent container - which might be the 'body'. But it will not be quite at the bottom because of the 'height:105px;'.
    "I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
    Validate your HTML and CSS


  •  

    Posting Permissions

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