Base Master Pages

Minimal or Base Master Pages


The following is a collection of stripped down master pages for your use with SharePoint 2007 sites. The master pages that ship with SharePoint (default.master, blueband.master, etc) are full of formatting code for the respective design for the master page, so to create your own master page you have to copy a master page and strip out all of formatting code (HTML, etc) in the file. With these base master pages, I have done that step for you, plus included comments tagging the Content Placeholders so you quickly identify the Content Placeholders and handle them how you see fit.

Below are some commonly asked questions, and a few notes about the file.




Please note that the base master pages include the HTML Transitional DTD that will display your site in quirks mode.  Please replace the DTD if you need a more refined presentation mode for your site. A bit more info… or a lot more info.


  1. What is a Master Page?
    Please read this post: MOSS 2007 Design Component Relationships and Diagrams.
  2. Hey, can’t I just create my own master page?
    Sure, but it is a long process. There is a set of Content Placeholders that must be included in your master page in order for it to run in SharePoint. The point of the base master pages is to provide you with that set of Content Placeholders without all of the formatting code.
  3. OK I downloaded this code, now what?
    Create a master page in your development SharePoint site. Paste in the base master page code (in lieu of the code that is added when the file is created) and save the file to your master page gallery. I suggest using SharePoint Designer to complete these actions. In your site, apply the master page in Site Settings. View your page. Your site should now show just the Content Placeholders.
  4. Gak! My site looks weird now, everything is just stacked on top of each other!
    Yup, the base master page has no formatting code. Take a look at your master page file and you will just see Content Placeholders. Now it is up to you to add HTML and the like to format your site. It is like putting together a puzzle, you will need to add your formatting code and piece in the Content Placeholders where you need the various SharePoint elements.
  5. There are Content Placeholders I don’t want in my site, what do i do?
    Don’t delete them! The Content Placeholders have to stay in the file for SharePoint to run. If there is a Content Placeholder you don’t want to use, move the code to the hidden ASP Panel located at the bottom of the file. This is a nifty trick, the ASP Panel has the visibility set to false, so while the Content Placeholders are included in the file (and ultimately your site) everything is hidden from view. You can place as few or as many Content Placeholders in this hidden panel as you like.
  6. The base master page still has some stuff that looks like SharePoint, why is that happening?
    If you take a look at the screen shots for each base master page or at your site after applying it, there are some items that still look like SharePoint such as navigation and the web part title bars. This is because the user controls that control these elements include CSS styles outside of the master page. In order to update the look and feel of these items, you need to override the CSS that is being used for the elements. Use my CSS reference chart to help with this process.
  7. I applied the base master page, but when I view my site, I get an error.
    If all you have done is paste in my base code, make sure that the Registry tags in the top of the file still has some tildes in some key spots. Anywhere there is a reference to /_controltemplates, there should be a tilde (~) before the forward slash. Avoid losing these tildes by opening the base master page file in another application other than SharePoint Designer (such as Visual Studio or Notepad) and copying the code from there for your paste into your new master page file in SharePoint Designer. See below for a code sample. <%@ Register TagPrefix=”wssuc” TagName=”Welcome” src=”~/_controltemplates/Welcome.ascx” %>If you have started moving around Content Placeholders and editing the file and you get a site error, you have probably deleted a neccessary Content Placeholder or accidentally edited something to make the Content Placeholder invalid. The best thing to do is to turn off friendly error messages for your site and view the page again. Then SharePoint will tell you exactly what it is hanging up on. See the end of this page for instructions on how to turn off friendly error messages for your site.

For each base master page, there is a link to the code, and a link to a sample screen shot of what your site will look like after applying the master page code.

MOSS Collaboration Site Base Master Page AND WSS Base Master Page

There is no difference between master pages for a collaboration MOSS site and a WSS site.

MOSS Publishing Site Base Master Page

Turn off Friendly Errors

While in development, the friendly error page that SharePoint displays when your page has an error can make debugging your master page issues very difficult. You can make an easy change to your Web config file for the site to turn friendly error messages off, therefore providing you with more useful information if your page breaks. Only do the following in a development environment, you would never want to turn off friendly error messages in a production environment. Also be sure to make a back up of the file prior to editing.

  1. On the Web server, navigate to the site directory:
    Local Drive:InetpubwwwrootwssVirtualDirectories[directory for site] (for example 84)
  2. Open Web.config in Notepad.
  3. Search for “CallStack“. Change the CallStack status to “true“.
    <SafeMode MaxControls=”200” CallStack=”true” DirectFileDependencies=”10″ TotalFileDependencies=”50″ AllowPageLevelTrace=”false”>
  4. Search for “CustomErrors“. Change the mode to “off“.
    <customErrors mode=”Off” />
  5. Save and close the file.

Now when your site encounters an error, you will receive a .NET screen outlining the issue instead of the friendly SharePoint error screen. This is particularly useful with dealing with missing Content Placeholders and editing Master Pages. To turn friendly error messages back on, just walk through these steps setting the CallStack to false and CustomErrors mode to On.

57 thoughts on “Base Master Pages”

  1. Oooh, this minimal publishing master could have really helped me about 3 months ago!

  2. Heather,As usual, your instructions are excellent and to the point. These set of instructions should allow any baseline html designer to incorporate a good design layout for sharepoint. Thanks!

  3. Thanks for all your hard work Heather, those of us just digging in really appreciate all you do. Definately looking forward to the WSS Base Master Page addition here.

  4. I created a a site column with unexpected results; The column that i created was replicated throught my site, even to the templates. I created a column named SiteID. After I saved this, the entire site that referenced the contacts template as well as the templates themselves, have the the SiteID colm instead of Title or Name column

  5. Hi Heather,Great Blog you have here, i´m learning a lot (newbie in sharepoint :o))!And how about the nested master pages, is it the same? I was trying to build a master page without left navigator, only whit the header, and the rest in my page layout, is that possible?ThksCrist

  6. Always great information Heather! I have a quick question about changing another error page. I am trying o find out where to change the default error page look and feel that SharePoint gives on many of it’s internal errors such as “Unknown Error” or “You are not allowed to respond again to this survey. “. The page seems to ignore the Master page and is very basic. Can you please tell me how to change this?Thanks,Jason

  7. thanks for the updated comments, good post Heather can’t wait to meet you in Vegas…

  8. Hi Heather,Is the base master page different for different site definitions? When I check through SharePoint Designer all the site defs have exact master page. Where as in your post you have mentioned two different master pages for different site defs. Regards,Shiva

  9. Appreciate what you have provided here. the Base Master page has definitely helped me get up and running. Oddly, the minimal page that MS offers wasnt working. Thank you Heather!

  10. HI,I’m trying to do something similar to your Collaboration site base page.I noticed as I was working that teh Left Nav items(Quick launch etc) don’t have a __designer attribute unitl I used a HTML comment to remove that section from the screen. Suddenly I was getting errors on my site and I noticed the file had literally doubled in size.The error was cannot convert ‘Microsoft.SharePoint.WebControls.EncodedLiteral’ to ‘System.Web.UI.IAttributeAccessor’ I notice you have the same __designer attributes, did you get a similar problem?Any ideas where this is being put in eg Designer, Sharepoint checkin?Cool post

  11. You are the only one I’ve seen who has passed on that bit about putting the tildes back in to solve the errors. You are my hero. Thanks very much for this excellent base master page.

  12. I am having a hard time getting the changes to show up – I open the newmaster.master file – make the changes and save, then I go to the sharepoint site and hit f5 but nothing shows I also tried going through the ‘publish’ process – but still no changes – i remember you mentioning this in class – but don’t remember what the trick was – can you remind me?Thanks for this lovely bit of clean code – very helpful

  13. Hello:While this site is a breath of fresh air over any Microsoft site, concerning customizing Sharepoint Master Pages and just explaining all the classes and such in a Master Page, as a writer, it drives me nuts when I see critical steps missing.In this case, you mention “Paste in the base master page code”. What ‘base master page code’???? You elide completely over this critical step! Ack. Very frustrating. It turns a potentially excellent 5 star article, into abject failure based on your goal of explaining how to ‘customize master pages’.This site would be much better also, if you actually showed a couple of example master pages *with* css code. In fact, I would venture you would receive way more revenues and page views both for your consulting and from ads on the page, if you had done this.

  14. Hi,I looking for a place to buy a Master page for my companies MOSS site. Is there any place where I can find pre-made master pages where I can just drop in a logo on to. Or even just make some minor adjustments. We are looking to setup a site fast and not use defaults provided by Microsoft. Any info would be great.

  15. Hi Heather,Thanks for your base master page, it came in handy in the initial stages of branding my department’s new website. The new site is supposed to be XHTML compliant, but, fat chance, because quite a few of the SharePoint controls are sealed, so I cant override their render methods to make them XHTML compliant. Very annoying but what can I do about it? I already whinged to MS.Anyway, I had a quick question… My master page now looks beautiful with all my custom menus etc in it, but it has some problems when acting as a “System Master Page”. I understand that these system master pages (“default master page” in SharePoint designer) require extra or different code over the custom master pages. For most uses, like displaying a list when logged in, and approving things, etc, the master works fine. But certain pages, eg a “Properties” page for a list, I get script errors in the browser!!! I was wondering if you knew anything about making a System Master Page function as expected. I really can’t see where my master is missing anything over one of the out of the box ones. Very frustrating! And I can’t find any info anywhere on this topic…..Thanks for your time-Adrian

  16. Hi Heather,I have a site that looks good in a normal browser but needs help when you go to a mobile browser. Do you have any good CSS files for working with mobile browsers.

  17. Hi! i found a lot of films here, of course if you are using rapidshare premium account http://loadingvault.comNo over rapidshare crawlers can be compared with is a best rapidshare search engine.

  18. Heather – This is fabulous. I’ve downloaded the current base master page, opened in textpad, then copied into SPD. Unfortunately, I’m getting quite a few “Error Creating Control – unknown server tag” errors. Is there something I’m missing?Thanks so much!Dianna

  19. Hi Heather,I noticed you have a rogue </div> tag in your base master page at the end of the SharePoint:SPLinkButton control in PlaceHolderLeftNavBar.It’s the closing div to <div class=”ms-quicklaunchheader”>Regards,Mike Sharp

  20. I am not able to view my master page gallery while i am trying to open my site in sharepoint designer 2007 .Then i tried to open that page in sharepoint designer through the browser also,then its showing a message like “The document could not be opened for editing.A windows sharepoint services compatible application could not be found tio edit the document.Please advise me how can i solve this issue.

  21. I completely agree with all that here is toldYour blog about this Base Master Pages helped me a lot. thank you! Master

  22. Hi ~I have been experiencing some master page issues. I created a master page layout in one site that I LOVE. I want to save that master page to a completely different site…Copying the default.master page from one site and pasting it over the default.mater of another site isn’t working? Thoughts?

  23. Can a master page be designed with a <div> tag layout versus a <table> tag layout? The reason I ask is for accessibility reasons.

  24. Hi,How can we have different Master Pages for a Site ? e.g. HomePage, SubPages etc.The homepage of my site is totally different then the other sub pages. If I make Custom Master for my sub pages, and apply it to the whole site, then how will I make my HomePage?There is nothing common among the homepage & sub pages.Please help, would appreciate your quick help. I am desperate !!Thanks,Gurmeet

  25. I followed the instructions for starting to use this example of the minimal master page. I just brought in the page. And applied to a web page and got this error. The resource cannot be found. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly. I am doing this for publishing site.I checked all the tildas and they are there.

  26. The DOCTYPE tag in both of your masters uses smart quotes. <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>Minor, but should be changed to standard quotes to be safe.

  27. I tried using your base master page because I read around the net that it was the best. After messing around with it and getting it to look how I wanted it, I ran into a problem. If I tried to view the properties of any of my pages in the pages library, all of the text becomes small and hard to read. I thought that I had maybe done something wrong when working with the master page but then I tried applying your original as the master and the text is still small. Any way to solve this problem?

  28. Are all the CSS classes from the CSS reference sheet included in this base master page? I’ve been looking for some classes to style but I can’t find certain classes in this base master page.If not, can you show me where I should insert the class attributes in the master page.

  29. Hi,For the Customization the heather Solomon Would be the Best i Feel like vise can any one say me which site would be the best for Sharepoint Coding

  30. Hi Heather,Thats a really good article. I am facing a problem in implementing a custom default.master. I am trying to replace the existing default.master with my own custom default.master. How can i do this with the help of a feature? It will be really great if you can throw some light on this.

  31. For everyone asking about their custom master page NOT applying to application screens (_layouts) please remember that the application screens use a different master page. Themes will affect application screens, or you can use a Feature to change what master page is used by application screens.

  32. Hi to All,i am working on sharepoint internally using with many custom master pages, and everything was going fine untill the time i add new master page with some of pages created based on it, and problem was i cannot add any webpart ever from the browser to any pages in sharepoint site or to any site collection, except the case if i ceate the new page inherits from the default master page which comes from product by default,i have spent lots of days checking why that happened, till i used the default master page, now can anyone tell me wht the exactly different btwn custom master page and the built-in One, that makes webparts not working and shows Error when using it from browser.

  33. This is awesome. I so wish I’d had these when I did a Sharepoint branding gig a few weeks back. I’m a web standards guy so dealing with quirks mode rendering and table layout was driving me insane and skewing my opinion of Sharepoint. Perhaps things aren’t looking so bad now :)Now all I need is some information on how to replace the standard Sharepoint controls (menus, treeview, search box, etc.) with versions that emit nice standards compliant, stylable and accessible XHTML (no table layout) and I might even start reccomending Sharepoint as a decent CMS for public websites!

  34. Hi Heather, Thanks for your articles, ALL of them provide great help. I am having the same problem as Agnes and Sharepointer however, that being _layouts pages and sub-sites do not have the customized default.master applied to them.You said “For everyone asking about their custom master page NOT applying to application screens (_layouts) please remember that the application screens use a different master page. Themes will affect application screens, or you can use a Feature to change what master page is used by application screens.”Could you please elaborate on this “Feature” so that I can force ALL pages on the site to use my default.master? Thanks in advance for your help!George

  35. Thanks for this, Heather. I’ve used your base master page for Collaboration site templates several times, and it’s been great.However, this time I’m trying to add an “I need to…” web part to the master page, but each time I do, I get this error message:”Error “Value cannot be null. Parameter name: webNode” occured processing your request. Review the error message and correct the problem.”I’ve tried exporting a working one from a non customised page and importing it into my site, and then adding it to the masterpage, but in the browser the result is always the same. Do you know if this can be done at all, or am I just wasting my time? Other web parts I’ve tried work fine in the masterpage, e.g. search box and summary links – only this one doesn’t!.Thank you in advance,TA.

  36. Tremendous resource Heather! Thanks so much.I do have a question if you or anyone else can chime in. It’s in regards to application pages using their own theme/master page. If I’m on a farm that includes other sites and cannot alter the application pages reference to a particular theme… is there a way in my mater page(s) to override the application pages ? Perhaps that what you meant by that “Feature” comment above, but I didn’t know what that meant. ;-)Thanks again for the wonderful info!

  37. I like an easy life……..which is what you’ve given a lot of people through your gracious sharing of your expertise and knowledge for gratis. In a broader context though, its people like you that make the world seem a better place for your selflessness. I only hope people see beyond the free download and that the true value and nature of your assistance is an example for many of us to follow. SincerelySLJJ

  38. Heather, When I try to use your Master Page I get a “ContentPlaceHolder:PageTitleBreadCrumb” cannot be found. error Any ideas?

  39. The base master page after customization works perfect in WSS 3.0, but gives an error when applying it on MOSS. The code seems ok. Any ideas? Thank you

  40. Hi Heather,Your page has been a great reference! I’d love to take your bootcamp too… I have (a very stupid) question for you.When I apply your base master page to my sharepoint site, the entire site stops working and I get an error that reads “File Not Found” on every page. I’m sure there’s something I should be doing that I’m not. I’d appreciate any advice! Thanks!

  41. Hey heather! We have adopted your Minimal master and love it! I’m wondering if you have the same sort of minimal master for the system master page?

  42. Hi Heather, Your site is my reference to Styles, CSS, themes and Master Page design of my SharePoint Application. All posts are really informative. I have a request: Plese explain more about how to apply themes to application screens(_layout). I also have the same issue like others – theme is not getting applied to the _layouts pages. I saw your reply to this posted on 8/27/2008 (Themes will affect application screens, or you can use a Feature to change what master page is used by application screens), but not able to fix it. Need your help.Thanks in advanceThomas

  43. I recently created a custom master page in SharePoint Designer and published it on my MOSS site. I have set this custom master page as the default master page for my site and the code renders correctly with out any errors. I do get a problem however of it not allowing the site to be viewed anonymously, even though in the site permissions it is configured to allow anonymous access. I suspect that it might have something to do with a “%@ Register” tag or a “SharePoint: ” tag. Any ideas?Thanks!

  44. I’ve been learning about breadcrumbs. I made a copy of the BlueBandGlass master and edited it to meet my needs. It looks really great, except I realized there weren’t any breadcrumbs being displayed. I tweaked it by copying the breadcrumbs from the default masterpage. This worked great for the main site, but had no affect on the subsites. I discovered that I could edit the default.aspx files in the subsites and make the breadcrumbs refer to the masterpage for their behavior, but it seems I shouldn’t have to do that.Isn’t there someway I can automagically get my breadcrumbs in the subsites?

  45. Hi Heather,I’ve successfully used your minimal master page and Ted Pattison’s LitwareBrand project to implement a custom layout for a client site ( but,I’ve just now completed a second custom layout based on your HeathersBaseCollaborationMasterPage.master which works fine except for 1 problem. Now when I go to edit a page and ‘Add a Web Part’ the ‘Add a Web Part’ selection form renders with no ‘Add’ or ‘Cancel’ buttons?!I’ve also tried this using your page as is with the same result!Do you have any idea what the problem might be?CheersMartyNZ

  46. Is there any way to edit the master page in WSS to comment out the default Top Link Bar and instead use a custom web part as the primary site navigation strip? I am referring to the Bamboo Navigators Web Part with flyouts, etc.

Comments are closed.