To register and reference your external CSS file on a custom SharePoint 2010 master page, insert the following line inside the <head> tag of your custom master page.

<SharePoint:CssRegistration Name="<% $SPUrl:~sitecollection/Style Library/YourCoreFileNameHere.css %>" After="corev4.css" runat="server"/>

To register more than one CSS external file, check this other post.

Note: I always recommend making copies of Microsoft files and pages and not to work on them directly. For what I described above, I usually make a copy of the v4.master master page and I also make my own copy of the corev4.css file, leaving both the original v4.master and corev4.css files alone.

Your comment will be posted after it is approved.


Leave a Reply.