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 Coder
    Join Date
    Mar 2012
    Posts
    19
    Thanks
    4
    Thanked 0 Times in 0 Posts

    how to attach a foot.php at the bottom of the page

    Recently I had some problems using the foot.php as the foot of all the pages on a website. Can anyone help me with this?
    suppose this is the content of the foot.php file.
    ...........................................
    <div> this is the foot</div>
    </body>
    </html>
    ...........................................
    if I just add <?php include('foot.php')?> at the end of the webpage, then there will be a large area of blank at the bottom of the browser if the body of page is short.
    if I tried styple="positon:absolute;bottom:0", but it didn't work if the body of the page is long(it will be loacated at the bottom of the screen while loaded).
    Using style="positon:fixed;bottom:0" is not good because this foot will always float at the bottom of the screen.
    What I want is to attach the foot.php at the end of the page and there will be no extra space at the bottom if the page is short regardless of the screen resolution.

  • #2
    Regular Coder nomanic's Avatar
    Join Date
    Feb 2009
    Location
    United Kingdom
    Posts
    255
    Thanks
    9
    Thanked 33 Times in 33 Posts
    you want your footer either at the bottom of the viewport or the bottom of the page, depending on page length. I dont think you can choose that, have to choose bottom of page or viewport. Cant have both.
    <DmncAtrny> I will write on a huge cement block "BY ACCEPTING THIS BRICK THROUGH YOUR WINDOW, YOU ACCEPT IT AS IS AND AGREE TO MY DISCLAIMER OF ALL WARRANTIES, EXPRESS OR IMPLIED, AS WELL AS DISCLAIMERS OF ALL LIABILITY, DIRECT, INDIRECT, CONSEQUENTIAL OR INCIDENTAL, THAT MAY ARISE FROM THE INSTALLATION OF THIS BRICK INTO YOUR BUILDING."
    <DmncAtrny> And then hurl it through the window of a Sony officer
    <DmncAtrny> and run like hell

    Portfolio, Tutorials - http://www.nomanic.biz/

  • #3
    Senior Coder
    Join Date
    Jun 2008
    Location
    New Jersey
    Posts
    2,536
    Thanks
    45
    Thanked 259 Times in 256 Posts
    You can have both, but with javascript only... but it wouldn't make sense (unlike a content that starts off fixed to the page, then moves when it reaches a certain height). If its at the bottom of the window and you add a margin to the body equal to the height of the footer, then when you get to the bottom of the page, it'll look like its attached to the bottom, but will move with the scroll.


  •  

    Posting Permissions

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