Question

I'm using Seattle for our System Master Page. This is working fine, except now I need to insert some custom JavaScript and CSS into it. How do I add custom JavaScript and CSS to the System Master Page? Can I still use the default master page?

enter image description here

Was it helpful?

Solution

You can edit the master page HTML file and then add your CSS & JS references.

The best practice is to take a copy of seattle.html (html master page) and then work on that.

SharePoint online refer custom css and javascript in MasterPage (Site Assets)

OTHER TIPS

If you just want to add a custom CSS and JS to your master page, then instead of creating a new master page, try the following and check if it works for your purpose.

  1. For Custom CSS : Use the Alternate CSS Url to set a custom CSS File.
  2. For referring a custom JS file follow this approach - http://spdeveloper.co.in/tipsntricks/pages/referencing-js-files-using-custom-action.aspx (This is for SP 2010, however it should work for SP 2013 as well).

This would be a better approach instead of creating a custom master page.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top