Adding a sticky footer to your custom master page using SharePoint Designer 2010
Adding a sticky footer to your master page is one of those basic things that takes a lot longer in SharePoint than it should. My first attempt at sticking a footer to the bottom of my page ended unsuccessfully with the footer always being about 100-200 pixels above the bottom of the page. I took a deep breath and asked my good friend Google for help. Google introduced me to Elio Struyf’s most excellent posts straight out of Belgium.
Struyf, Drisgill and other experts note that the javascript used to control scrolling in the Ribbon Positioning System (docked by default at the top of each SharePoint 2010 page) is the main culprit causing all of this footer kerfuffle. They offer advice on how to disable the Ribbon Position System (RPS) so that it is undocked, but I like having it docked. Fortunately, Struyf has a master page for the default docked ribbon (I use this one) as well as the undocked ribbon.
By adding some new div tags to the html of the master page, some new CSS, and tweaking some attributes in the V4.masterpage, Struyf has built a master page that sticks the footer to the bottom of the page while keeping the RPS docked at the top of the page.
Here are the steps and screenshots I took to add his master page to my farm:
- Downloaded his master page from his web site: V4.Master_Footer_Docked_Ribbon to my desktop
- Navigated to the Master Page Gallery in my Site Collection and uploaded the master page
- Opened site in SharePoint Designer 2010, and opened new master page for editing
- Copied and pasted the CSS from his header to my custom style sheet
- Added a line of code in the header to attach my custom style sheet (see Part 2 for instructions)
- Saved, Checked-In, Published, Approved Master Page
- Refresh browser to view footer (screenshot)!
Screenshot 1: V4.master Head (click image for larger view)
Screenshot 2: V4.Master_Footer_Docked_Ribbon Head (click image for larger view)
Screenshot 3: V4.master footer (no footer yet) (click image for larger view)
Screenshot 4: V4.Master_Footer_Docked_Ribbon footer (click image for larger view)
Screenshot 5: CSS from V4.Master_Footer_Docked_Ribbon (I moved this code from Elio’s master page to my custom style sheet)
Featured Series of Posts on Branding Options in SharePoint 2010:
0. SP 2010 Branding Options: Master Pages vs. Themes: Overview
Why I prefer custom master pages over custom themes in SP 2010
1. SP 2010 Branding Options: Master Pages vs. Themes: Part 1
Attaching an alternate style sheet to the master page using the browser’s UI
2. SP 2010 Branding Options: Master Pages vs. Themes: Part 2
Attaching an alternate style sheet to the master page using SPD 2010
2.1 SP 2010 Branding Options: Master Pages vs. Themes: Part 2.1
How to edit the master page to add a custom logo and a favicon with SharePoint Designer 2010
3. SP 2010 Branding Options: Master Pages vs. Themes: Part 3
Adding a footer to your custom master page using SharePoint Designer 2010
4. History of SharePoint Branding: 2007 to 2010
A tribute to Heather Solomon’s legendary blog posts on MOSS 2007 themes and master pages