Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I've got a document library embedded on the home page of one of my SharePoint sites. Someone changed the background color to grey, overriding the site's theme background color, which is white.

I've tried Google, the docs, etc., but I can't seem to figure out how to change the background color.

enter image description here

share|improve this question
    
look at the page history. If you are lucky, revert back to a working version, if you a bit less lucky, find who updated the page and ask him what he did. –  Steve B Jan 18 '12 at 15:47
add comment

2 Answers

I guess someone changed the color of the webpart in your stylesheet (or in a custom stylesheet) Or added style blocks in the masterpage, pagelayout, pages,...

If you use IE, press F12 to show the developer toolbar. When you select the arrow-button on the toolbar, you can click on the webpart and the toolbar will then show you what style's it contains. It's possible you'll need to go up or down a few levels to find the style you're looking for. (that's in the left part of the toolbar)

share|improve this answer
    
Thanks. I see which class and which stylesheet the background color comes from. But how do I edit a site's stylesheet? Does that have to do with its master page? Or can I edit CSS independently? This is really unintuitive. –  Rob Sobers Jan 18 '12 at 17:40
    
If it's a custom one, you'll need to look for the stylesheet on the site (in a libary) and edit it there with sharepoint designer or download a copy, edit it and upload the new version. If it's a standard one, I guess you can look for it and edit it in the "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\..." folder. –  Ruben Herman Jan 19 '12 at 8:08
    
Normally you should also be able to find a custom stylesheet in the folder mentioned above. –  Ruben Herman Jan 19 '12 at 8:11
    
To give you a better idee where the stylesheet is located, there should be a link on the masterpage, pagelayout, page to it. –  Ruben Herman Jan 19 '12 at 8:16
add comment

Alternate CSS

SharePoint’s Alternate CSS feature allows you to upload a css file to your SharePoint site and designate that this file be referenced when pages on the site are rendered.

To add an Alternate CSS file

  1. In your favorite text editor, create a css file named "alternate.css" with the following contents:

    /* This should change the SharePoint site's background color to gray */
    body #s4-workspace {
       background-color: #D8D8D8;
    }
    
  2. Upload your CSS file to the SharePoint site. For this example, upload it to the Style Library.

To apply an alternate CSS file to the SharePoint site

  1. Go to Site Actions, then Site Settings. In the Look and Feel section, click Master page.
  2. For Alternate CSS URL, select the “Specify a CSS file to be used by this publishing site and all sites that inherit from it” radio button. Click browse. Browse to your alternate.css file so that your Location (URL) field is /Style Library/alternate.css . In the Select an Asset window, click OK. Your css file will be be shown as "http://yoursiteurl/Style Library/alternate.css".
  3. Click OK.

For more information on custom SharePoint branding, check out the Real World Branding with SharePoint 2010 Publishing Sites article by Randy Drisgill and Andrew Connell.

share|improve this answer
add comment

Your Answer

 
discard

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.