0

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 Mar 4 '16 at 15:08
1

maybe...

body {
    background-color: lightpink;
}
  • and maybe include an !important :) – ova Mar 4 '16 at 15:01
1

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 Mar 5 '16 at 9:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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