0

I am having trouble adding my custom css file work in Sharepoint 2013 foundation. I added a link tag in both v4.master and seattle master pages but to no avail. I thought it would be straight forward or as easy as Sharepoint 2010.

Could you help explain this to me? Also I can't find the _layouts folder that holds the core15.css file.

Or is there a link that I can go to with tutorials and etc?

1 Answer 1

1

The layouts folder can be found at the following location

%ProgramFiles%\Common Files\Microsoft Shared\web server extensions\15\TEMPLATE\LAYOUTS

The COREV15.CSS file can be found at

%ProgramFiles%\Common Files\Microsoft Shared\web server extensions\15\TEMPLATE\LAYOUTS\1033\STYLES

Were 1033 is the installed language folder.

You can register your CSS for example below the default corev15.css like this

<SharePoint:CssRegistration Name="Themable/corev15.css" runat="server" />
<SharePoint:CssRegistration Name="/_layouts/15/styles/<youre css file here>" runat="server" />

There is one more property of a SharePoint site called AlternateCssUrl. You would use this property if you don’t want to create a MasterPage or a Theme, but just apply a skin on the SharePoint default look – by specifying a value for this property, you make SharePoint include your style sheet in its pages.

3
  • Thank you Remko for replying. My follow up question is where exactly would I put this code: <SharePoint:CssRegistration Name="/_layouts/15/styles/<youre css file here>" runat="server" />. Is it under the v4.master? Dec 3, 2013 at 20:36
  • It depends which master you use. For css only you can also look at setting SPWeb.AlternateCssUrl. Added some additional info to the answer.
    – Remko
    Dec 3, 2013 at 20:44
  • Oh, I understand. If I link it in one master page (seattle.master) it will work for all. Thank you. Dec 3, 2013 at 20:47

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.