SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to apply a different CSS file to system pages in a SharePoint 2010 site collection? We don't want to modify the master page and weren't sure if there's any other solution. Thanks.

Update: We're using a custom page layout for our publishing pages; within this, we have some CSS files that contain custom classes but also overwrite existing SP classes. We have not touched the master page so it's using the default one that came with SharePoint.

share|improve this question
It depends on how your CSS is built. Does it overwrite existing standard SP css classes? Do you use a custom masterpage for non-system pages? Please provide us with more info on this. – Daniel Ziga Dec 6 '11 at 10:01
Hi, @Dandroid. Please see update above. – Alex C Dec 6 '11 at 11:33
up vote 3 down vote accepted

You could create a SharePoint DelegateControl as described here and check in your code if it runs on a page which contain "/_layouts/" in the url and if so add a reference to your custom CSS file.

share|improve this answer

A solution is to create a custom masterpage, in which you register all CSS classes needed. This way, you'll be able to use the custom masterpage on your non-system pages and the v4.master (or whatever you're using) on your system pages without having to bug with alternating css.

I personally always go with this as it garuanties me full control.

share|improve this answer

You could use the alternate css link to brand your system pages, this can be done without any custom code

share|improve this answer
If I remember correctly an alternate CSS link applies to all pages, including system pages. So, I'm not sure how your solution would work out for the original poster of the question. – Sig Weber Dec 6 '11 at 12:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.