I have a custom html with css with background color - light pink.

However, after converting it to a master page, the background color is now the default white.

How can I change that for SharePoint 2013?

  • 1
    Try inspecting the site using the developer tools in your browser. Find the outer most element which sets a background-color and overwrite its css class in your custom css.
    – user2536
    Commented Mar 4, 2016 at 15:08

2 Answers 2



body {
    background-color: lightpink;
  • and maybe include an !important :)
    – ova
    Commented Mar 4, 2016 at 15:01

Make sure to register your CSS and have it apply after the default CSS:

<SharePoint:CssRegistration name=”<% $SPUrl:~sitecollection/Style Library/Custom Style/css/yourCustom.css %>" After=”corev15.css” runat=”server”/>

No need to use !important in this case.

The CSS to overwrite the default white background is as Tiago stated.

  • Thanks Dana. For some reason, I have to use !important to make it work.
    – bswee
    Commented Mar 5, 2016 at 9:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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