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?
2 Answers
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)
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.
- For Custom CSS : Use the Alternate CSS Url to set a custom CSS File.
- 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.