Koodinpätkiä / Code Bits
Add custom CSS file to a Sharepoint 2010 site
Migrated from Blogger
EN
Open up your current masterpage. This is usually v4.master by default, and always located in the “_catalogs/masterpage” directory. Remember to make a copy of it and edit the copy! Then set it as your default Master page.
Right before the
<asp:contentplaceholder id="PlaceHolderAdditionalPageHead" runat="server">
</asp:contentplaceholder>
tag, put the following line of code to include a reference to your custom CSS file.
<sharepoint:cssregistration after="corev4.css" name="<% $SPUrl:~SiteCollection/Style Library/Custom/styles.css %>" runat="server">
</sharepoint:cssregistration>
Done!