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 10 of 10
  1. #1
    Senior Coder
    Join Date
    May 2004
    Posts
    1,466
    Thanks
    15
    Thanked 0 Times in 0 Posts

    footer showing at the bottom of the page

    i want my footer to always show on the bottom of my page

    but if my page is longer then the screen it shows the footer on top of the text - how can I put it so it only shows at the bottom of the screen?

    what's the trick

    my current code

    PHP Code:
    #footer {
            
    positionabsolute;
            
    bottom:0;
            
    width100%;
            
    height1.3em;
            
    border-bottom1px solid black;
          }
          
    #footer p {
            
    padding1px 5px 0;
          } 

  • #2
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,338
    Thanks
    5
    Thanked 363 Times in 360 Posts
    Gonna probably need more than the bit of css you gave. A link to your live site would be best.
    Teed

  • #3
    Senior Coder
    Join Date
    May 2004
    Posts
    1,466
    Thanks
    15
    Thanked 0 Times in 0 Posts
    http://www.a web foryou.com/testp/testp.htm

  • #4
    Senior Coder alykins's Avatar
    Join Date
    Apr 2011
    Posts
    1,925
    Thanks
    46
    Thanked 203 Times in 202 Posts
    you may want to switch to a floating layout, the positioning is pulling things out of normal flow... for anyone else viewing...
    http://www.awebforyou.com/testp/testp.htm

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

  • #5
    Senior Coder
    Join Date
    May 2004
    Posts
    1,466
    Thanks
    15
    Thanked 0 Times in 0 Posts
    yes are probably right but I'm trying to just make changes to an existing site as easy as possible without recoding the html completely

    is there any easy way to do it?

  • #6
    Senior Coder alykins's Avatar
    Join Date
    Apr 2011
    Posts
    1,925
    Thanks
    46
    Thanked 203 Times in 202 Posts
    i dont see one that pops up and smacks me in the face... i added postion:absolute; bottom:0; to the footer and it moved it halfway down the page. I generally do not play around with attempting to layout positioned websites, so my inherent thoughts are to float everything (well everything that needs floated) and laying it out in a more common method

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

  • #7
    Senior Coder
    Join Date
    May 2004
    Posts
    1,466
    Thanks
    15
    Thanked 0 Times in 0 Posts
    i added postion:absolute; bottom:0; to the footer

    but this shows up at the bottom of the screen - not under the contents of the page?

  • #8
    Senior Coder alykins's Avatar
    Join Date
    Apr 2011
    Posts
    1,925
    Thanks
    46
    Thanked 203 Times in 202 Posts
    Quote Originally Posted by esthera View Post
    i added postion:absolute; bottom:0; to the footer

    but this shows up at the bottom of the screen - not under the contents of the page?
    yes that's what i meant, bottom of "the screen" but in the middle of ur content. my bad on phrasing

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

  • #9
    Registered User
    Join Date
    Jun 2011
    Posts
    1,063
    Thanks
    12
    Thanked 241 Times in 240 Posts
    your either talking about a sticky footer
    http://ryanfait.com/resources/footer...ottom-of-page/

    or

    a fixed footer
    http://limpid.nl/lab/css/fixed/footer

    woops sorry for the undercut, didn't look at the time :P

  • #10
    Senior Coder alykins's Avatar
    Join Date
    Apr 2011
    Posts
    1,925
    Thanks
    46
    Thanked 203 Times in 202 Posts
    Quote Originally Posted by Sammy12 View Post
    your either talking about a sticky footer
    http://ryanfait.com/resources/footer...ottom-of-page/

    or

    a fixed footer
    http://limpid.nl/lab/css/fixed/footer

    woops sorry for the undercut, didn't look at the time :P
    yes fixed works... tried it on the page...
    make CSS for footer
    Code:
    position:fixed;
    bottom:0;
    *hadn't tried this prior to now*

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


  •  

    Posting Permissions

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