Inserting a Custom CSS Stylesheet
You can easily add your CSS file using the JavaScript Insertion page. You only need the CSS file's URL.
Adding an Insertion
- In the JavaScript Insertions page, click + ADD INSERTION.
- Select Custom Script from the Insertion Type menu.
- Enter a sort Name.
- In the JavaScript Code Editor, paste the following code:
var head = document.getElementsByTagName('HEAD')[0];
// Create new link Element
var link = document.createElement('link');
// set the attributes for link element
link.rel = 'stylesheet';
link.type = 'text/css';
// REPLACE url of file
link.href = 'https.example.com/css/styles.css';
// Append link element to HTML head
head.appendChild(link);
Updated almost 4 years ago