Referencing a custom css file in a master page


For small customisations I will sometimes insert styles using a Script Editor web part, but the best way to apply custom style sheets is via the master page.  Here’s how I do it:

1. Upload the custom .css file to SharePoint (I use the Style Library)

2. Open SharePoint Designer

3. Open the site and select Master Pages from the navigation on the left

4. Right-click on the required master page (in my case seattle.html) and select Edit File in Advanced Mode

5.Add the following code to link to the new css file:

<!—SPM:<SharePoint:CssRegistration Name=”/Style Library/css/custom.css” runat=”server”/>–>


6. Save the file

The styles should now be available within any pages that are using the Seattle master page.

Note: you can’t edit the seattle.master file directly

[BlogBookmark] [Blogsvine] [] [Digg] [Facebook] [Furl] [Google] [LinkedIn] [MySpace] [Reddit] [Slashdot] [StumbleUpon] [Twitter] [Windows Live] [Yahoo!] [Email]