Grow your CSS skills. Land your dream job.

Cannot get sticky footer to work!

  • # May 6, 2008 at 6:27 am

    Hi guys

    I’ve tried using the sticky footer (recommended on the gen discussion page http://ryanfait.com/resources/footer-stick-to-bottom-of-page/ )

    however when i put it into my site it goes astray on the following pages http://www.housecallphysio.co.uk/pages/accu.php and http://www.housecallphysio.co.uk/pages/price.php.

    there is too much code to copy here so i would be grateful if somebody could have a look and tell me where i’ve gone wrong.

    many thanks

    # May 6, 2008 at 5:46 pm

    you need to set your body and html height to 100%

    you also need a div which encompases the whole page (including the push div), but not the footer.

    # May 7, 2008 at 6:32 am

    Adam

    Thank you for pointing the error out, can’t believe i missed such a simple thing.

    That’ll teach me to re-read the instructions! :roll:

    One final thing if i may, although the footer is now in the correct place, it is pushes well below the bottom of the visible page.

    How would i get over this? use min-height in the content div?

    thanks again

    # May 7, 2008 at 1:21 pm

    you need to use the min height on the wrapper div.

    My guess is you’ve set a margin (although I haven’t read your code) if this is the case change it for padding. I will probably get a chance to look later.

    # May 7, 2008 at 3:19 pm

    Excellent

    Thanks for the pointer Adam.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".