Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7170737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:16:21+00:00 2026-05-28T15:16:21+00:00

Given a sticky footer such as that on Ryan Fait’s site with a fixed

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T15:16:22+00:00Added an answer on May 28, 2026 at 3:16 pm

    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.

    edit You 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:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
        <style type="text/css">        
    
        /* Original Sticky Footer: http://ryanfait.com/sticky-footer/ */
    
        html, body {
            margin: 0;
            height: 100%;
            width: 100%;
            }
    
        #footer {
            margin-top: -150px;
            height: 150px;
            }
    
        #footer {
            background: #bbd;
            }
    
        .block {
            width: 300px;
            padding: 20px;
            background: yellow;
            margin: 0 auto 150px; /* height of #footer */
            }
    
    </style>
    </head>
    <body>
    
    <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
    
        <tr><td>
    
            <div class="block">
                <h1>Vertically Centered!</h1>
                <p>This block will remain centered. Just needs that one table cell wrapping.</p>
            </div>
    
        </td></tr>
    </table>
    
    <div id="footer">Footer Content here</div>
    
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Given a 2 pane 100% height based faux column layout, I am trying to
Given an hypothetical utility class that is used only in program setup: class MyUtils
Given the array below, how do I get values of object(stdClass) such as Pcv
I've been given a design to build that uses a tabbed navigation structure, which
Some of you may know me from this question: Sticky Footer (not sticking!) Thanks
A file that is given as input to the linker is called Object File
I have a guice based app that now needs multiple instances of a given
I'm having problem with sticky footer trick. The problem is I want to fit
One more question about the sticky footer css... lets say i have the following
I'd like a page with a sticky footer, and I'd like the content above

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.