SharePoint 2010 Footer (CSS Only)

There's a lot of "solutions" out there to add a footer to SharePoint 2010, be it the out-of-the-box masterpage, or a custom masterpage. Unfortunately, a lot of the solutions offered up require scripting to make the footer "play nicely" with the native SharePoint 2010 scrolling mechanism. This is an adaptation of CSSStickyFooter adjusted for SharePoint 2010. This solution is 100% pure CSS and will place a footer at the bottom of the page without any scripting.

The first step is to locate the s4-bodyContainer div in your masterpage. We're not going to do anything to this container, but we are going to encapsulate it within a wrapper div. Indent #s4-bodyContainer all of the markup within it, and add a new div with a "wrapper" class.

<div class="wrapper">
  <div id="s4-bodyContainer">
    {original #s4-bodyContainer markup}
  </div>
</div>

After the closing tag for your .wrapper div, add your footer div, with an ID of "footer".

<div class="wrapper">
  <div id="s4-bodyContainer">
    {original #s4-bodyContainer markup}
  </div>
</div>
<div id="footer">
  Copyright or Other Footer Content
</div>

Now we just need to add a little CSS to make everything work. You'll notice that all of our markup is already inside the #s4-workspace div, so we don't need any scripts to set heights dynamically. We can set the footer position through CSS and SharePoint's native sizing scripts will handle the rest.

.wrapper {
  min-height: 100%;
  height: 100%;
}

#s4-bodyContainer {
  padding-bottom: 50px;
}

#footer {
  position: relative;
  margin-top: -50px;
  height: 50px;
  clear: both;
}

Note that the footer's top margin and height, as well as the #s4-bodyContainer's bottom padding must be set to the same pixel dimension. This ensures that your footer will not float over the page content.

This also assumes that you have left SharePoint's browser compatibility for IE8 intact. If you've modified or removed the "X-UA-Compatible" meta tag from the default value of "IE=8" then you may have to do some additional work to ensure cross-browser compatibility.