Saturday, July 17, 2010

Centering Your SharePoint 2010 Master Page

The other day, I was working on creating a new master page, starting with the v4.master. The team that I was working with asked to have the page centered in the browser window, and they sent me over a link to SharePoint Blues to use as reference.
http://www.sharepointblues.com/2010/05/06/centered-layout-with-v4-master/

Unfortunately, it did not work in my masterpage, so we kept looking and my coworker Ben found a simple solution:
  1. Open up your masterpager
  2. Look for the start of the body
  3. Insert the following within the body:
    •  {margin: 0 auto;}
And that was all that it took to fix the issue...  gotta love simple...