Given a sticky footer such as that on Ryan Fait’s site with a fixed pixel height, is it possible to center, both horizontally and vertically, variable-size content in the space above this footer?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I would suggest looking at Bobby van der Sluis’s article on Footers at A List Apart.
Example #7 at the end of his article shows a vertically centered block. It does rely on scripting, but it is truly minimal.
editYou can also use a single-cell table to accomplish vertical centering. Incorporating it with Ryan Fait’s sticky footer would give you something like this: