Apply custom CSS to style fonts, colors, and backgrounds beyond Squarespace's built-in options.
If you have coding knowledge and want to customize your site beyond the built-in styling options, you can add CSS code using the CSS Editor.
CSS should only be used to change fonts, colors, and backgrounds. Other CSS changes could potentially harm your site.
Watch a video
- Review our recommendations on what you should and shouldn't change with CSS in our Custom code FAQ.
- In version 7.0, Custom CSS doesn’t transfer when you switch templates. If you switch back to a previous template, the CSS you added to it will still be there.
- Squarespace’s CSS Editor syntax checking system is a parser, which tests what's going to work in different browsers. Even if your code doesn’t return an error on a CSS validator, the parser will flag it if it thinks that a line may not work the way it's intended. If you see a syntax error, revise the CSS to ensure it’s written and formatted correctly and nothing’s missing.
Note: Custom code, including CSS, falls outside the scope of our support. This means we’re unable to help further with setup or troubleshooting. Additionally, with a code-based solution, we can’t guarantee its functionality or full compatibility with Squarespace. This includes how it functions with our responsive design, particularly its appearance on mobile devices, and if it functions on all templates. CSS customizations can also cause display issues with future updates to our platform. While we can't help further, there are many resources that can point you in the right direction:
- Learn best practices for adding custom code.
- Read our general guide on code-based customizations.
- Visit the Squarespace Forum, our customer and developer forum.
- Hire a Squarespace Expert to help build custom code for your site.
- Explore our premium and enterprise-level plans to develop a more customized solution for your business.
Add CSS code
To add CSS code:
- Open the Custom CSS panel.
- To open the editor in an expandable window, click Open in New Window. The window will close if you navigate away from the Custom CSS panel.
- Add your code.
- When you're finished, click Save to publish your changes.
Line numbers display on the left to help you reference pieces of code. Syntax errors display at the bottom in red.
Upload files (optional)
Use the file upload area to upload assets for custom images or font files:
- Click Custom Files or Manage Custom Files under the CSS Editor.
- Click Add images or fonts or drag files into that area to upload your file.
Tip: If the file upload area doesn't open, enable pop-ups in your browser.
Accepted file types
The Custom Files area accepts valid image and font files:
The field doesn't accept .svg files.
Using custom files
To use the files:
- Write your code to the point where you need the file url to reference.
- Leave the cursor where you want to place the URL in the code.
- Click the file.
The CSS Editor automatically pastes the direct URL for that file so you can reference it in your code.
Custom files and SSL
The file's URL will be formatted as secure or insecure, depending on whether SSL is enabled. If you change your site's SSL preference, we recommend you update the file's URL to match. For example, if you enable SSL:
- Open the CSS Editor.
- Click Manage Custom Files.
- Click the file.
- Change the URL to start with https.
- Click Save.