SharePoint Styles & Application.master Skinning Workaround – A thought in progress

So I don’t have this fully flushed out and wrapped up into a neat and tidy article with a How-To, but I will soon.

The Issue Summed Up (more resources: Shane, and Shane followup)

Master pages control the look and feel with SharePoint 2007 sites. One of the issues with this is application.master.  This master page controls the look and feel of SharePoint pages that have URLs with “_layouts“.  This is a good chunk of a SharePoint site.  Unlike the other master pages and customization techniques for a site, there is only one application.master file, and changing it will affect the look and feel of all of the SharePoint _layouts pages on the server. (Yikes!) So there is quite a considerable dilemma for skinning sites, since you won’t be able to skin all pages the same unless the site is the only one hosted on the server and skinning application.master to match is not a big deal.

When a Page is Rendered

There are now numerous CSS files in SharePoint, the main one being CORE.CSS, which seems to be the next generation of OWS.CSS.  You can also create your own CSS files, and create CSS files to go along with your custom master pages.   Crummy thing is how SharePoint pulls those CSS files.   In the rendered page, SharePoint references CORE.CSS last, even after your custom CSS files for your custom master page. (Side note, I am trying to figure out a way around this).  Since whatever is called last is what is applied to an element, the fact CORE.CSS is pulled last is quite a pain.  For any default SharePoint styles you want to override in your custom CSS, you are pretty much out of luck.

The Life Raft

As a part of the Master Page settings screen (Site Actions/Site Settings/Master page) where you can set a site to use a particular master page, there is also a CSS file setting.  You have a choice to inherit styles from the parent, use WSS default styles, or you can specify your own style sheet.  I am not sure why the option for WSS default is there yet, since no matter what option you choose, you will get some SharePoint CSS files pushed down to your site.

But we can specify our own CSS file, and in the rendered page, this CSS file is called after CORE.CSS.  Excellent news for overriding those default SharePoint styles.

Ok, so what does this have to do with Application.master?

While messing with all of this, I noticed that screens under _layouts were reflecting changes that were in my custom CSS file that was specified in the settings.   So technically, you can create the appearance of individually skinned application.master files through CSS. This isn’t the end all solution for the application.master page issue, but it is sure better than sitting on one design for application.master. Instead you can be proactive and apply customizations through CSS per site for _layouts pages.

11 thoughts on “SharePoint Styles & Application.master Skinning Workaround – A thought in progress”

  1. great post for customization guys, i have a question: where is the core.css referenced in aspx file, i searched it in SPD but found no expected result, only found two shots in blacksinglelevel.master and orangesinglelevel.master, i am not using these two master page

  2. nxliu-I am not sure yet. No matter what it does get pulled into a site, I need to figure out from where though. Probably some user control pulling it in, no matter what you would like for it to do.

  3. Would an equally effective (and possibly simpler) solution not be to use Themes?The fact that MS didn’t address the “one rules for _layouts, one rule for everything else” issue in this iteration of the Sharepoint platform is quite frankly staggering as it effectively sabotages any attempts to create radically rebranded collaboration sites based on WSS/MOSS. Considering the effort they put into this area by moving to ASP.NET 2.0, adopting the Master Page approach to page development etc, it just seems completely crazy to then ignore the massive implications of having the structure of every _layouts page unchangable if wishing to make supportable changes.

  4. Joel,I agree with you… MICROSOFT WHY DID YOU NOT MAKE THE _layouts folder use the same master page as in the site that it is running in… I know that the _layouts folder is a seperate application but come on…I typically do very custimized WSS SharePoint solutions and this concept of _layout having a different masterpage makes WSS 3.0 not much better than WSS 2.0 in terms of 100% customization.Blake

  5. I don’t really think that using customized skins for the application pages is really a problem for public facing sites. It’s only going to be an issue if you are planning on using list and library views, etc. Otherwise, everything else about the look and feel can be managed through the masterpages and CSS/Themes development phase. Of course, as designers and developers, there may be some issues with this (and we beg Microsoft to make our development environments more flexible), but there are implications for why the application pages are not custom-enabled. The main reason is that they are shared across several sites in the virtual directories, so adding custom settings would affect every other application page in a site collection. The work around described above is not altogether desriable but works, none the less. Until MS can come to the party and ship out a service pack patch, it’s back to CSS for the look and feel… At least we have that…Now, is there still anyone out there who dislikes CSS and thinks creating killer websites is the way forward?

  6. “I don’t really think that using customized skins for the application pages is really a problem for public facing sites. It’s only going to be an issue if you are planning on using list and library views, etc. Otherwise, everything else about the look and feel can be managed through the masterpages and CSS/Themes development phase. “I see that the search page results are in the _layouts folder, so I think this would affect all sites including public facing ones.

  7. Hello stephen. Congratulation i think you are the first who post an instruction for customising an application master. I have to change the style for a sharepoint. I have no problems with the default.master and no problems to make changes with the “obsidian” style which i choose to customise. Now I have to change the style from the error pages (e.g. “Unexpected error has occured”). This pages uses the application.master so they look like the standard theme. But I find it funny that settings.aspx which also use the application.master is shown like e.g. default.aspx. Hope you can help me.

  8. i have changed my appliation.master page since then i am facing an error The website declined to show this webpage in the upload.aspx page is there any solution for this one or should i reinstall the share point once again.

Comments are closed.