Friday 16 December 2016

How to add custom CSS file in SharePoint 2013 Team Site MasterPage

There are two different ways to add custom CSS file in Team Site. In both the options you will need to first add your Custom CSS file in document library which is accessible to all users. In below example I have uploaded my custome css file in Site Asset document library.

Option 1:

  • Activate publishing feature on site.
  • Go to Site Action --> Site Settings

















  • Go To Look and Feel and then click on Master Page


















  • Scroll Down and Expand Alternate CSS URL and then browse your CSS Path and Click OK








You can use this option if you have publishing feature enabled, but what if the publishing feature is not enabled and you don't want to enable publishing feature.

In this case you will need modify master page and this is our option 2.

Option 2

  • Open your SharePoint Website in SharePoint Designer 2013.
  • Edit your masterpage and in Head Section add below lines of code. This will add your Custom css file in master page
<!--SPM:<SharePoint:CssRegistration name="&lt;% $SPUrl:~SiteCollection/Style Library/Custom Style/CustomCSS.css %&gt;" runat="server" after="corev15.css"/>-->

This way you can add your Custom CSS file in your SharePoint site.

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...