I'm using a custom Masterpage which references a custom CSS File in the header like so:

<Sharepoint:CssRegistration Name="CUSTOM/Custom.css" runat="server"/>

My custom CSS file is simply a copy of the corev4.css with some minor tweaks. However, when debugging my site I noticed that it is inheriting styles from both the corev4.css and my new Custom.css file.

I'd like to only reference my Custom.css file, leaving the corev4.css out of the picture. Is this possible to drop the corev4.css reference on my custom Masterpage?

2 Answers 2


I would advise against this...I would also advise against having an exact copy of the coreV4.css file.

Having both these files is going to beef up the load times and increase the needless amount of code the browsers need to go through.

Change your CSS registration to the following line. I also always add it after the CoreV4.css not that it makes a difference if you have the "After"

<SharePoint:CssRegistration runat="server" name="/CUSTOM/Custom.css" After="corev4.css"/>

In your custom.css file i would only add styles which you want to change, this will automatically override and take precedence over the coreV4.css. My "Custom.css" always starts pretty much blank aside from a few default styles I always use.

  • The "After" actually ended up being the key here, as some of my styles in Custom.css were still being overridden by the corev4. Thanks
    – Lando
    Feb 20, 2013 at 20:56

To do this properly, leave corev4.css alone and define your own custom CSS file that includes only the CSS classes that you want to override. CSS loads in order so as long as your custom CSS is loaded after corev4, your styles will be applied. Since your new file includes only the CSS classes that were modified, it will also be much easier to manage than if it included everything.

Another reason to do it this way is that Corev4.css is a system file and as such is subject to update in a SharePoint Service Pack or Cumulative Update. If you are using your own copy of the file, then you will not get the update leading to a user interface that could vary from flaky to unusable, depending on the nature of the fix.

  • Beat me to it Dave!
    – Stephen
    Feb 20, 2013 at 17:46

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.