Jump to content

CUSTOM CSS ERROR MESSAGE

Go to solution Solved by paul2009,

Recommended Posts

Hello,

Please see attached screenshots. We have an error code on our website:

'Error parsing Custom CSS, verify Custom CSS is valid' the error then states that 'Syntax error on line 21'

Is anyone able to help me with this issue please as we thought we did not have any coding on our website.

Any help greatly appreciated.

Many thanks

Amy

 

 

Image 2022-11-21 at 9.28.08 a.m..jpg

Image 2022-11-21 at 12.45.11 PM.jpg

Link to comment
  • Solution
12 minutes ago, Amyj said:

We have an error code on our website: 'Syntax error on line 21'

This is because you have unknowingly added some HTML to your Custom CSS panel. This panel is only for CSS, so you'll need to remove the HTML.

The error explains where to find the problem - it is line 21. The opening style tag ('<style>') is HTML, not CSS. When used in a different panel (known as Code Injection) it tells the browser to expect some CSS to follow and it works fine. However, when you are adding CSS directly to the Custom CSS panel, this panel only allows CSS, so it doesn't need the style tag and gets confused when it finds it!

If you have any tags (words within angled brackets) you'll want to remove them and save your changes.

Did this help? Please give feedback by clicking an icon below  ⬇️

Edited by paul2009

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

Link to comment
1 minute ago, Amyj said:

So i need to remove <style> completely?

Yes. And there's probably a second 'closing' tag to remove too, but we can't see that in your screenshot.

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

Link to comment
3 minutes ago, Amyj said:

Do you know where i can find the second 'closing' tag

If it is there, you should see a different error message after you delete the first one 🙂

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

Link to comment
2 hours ago, Amyj said:

the issue we were having seems to be rectified. Thank you so much!

Great, pleased I could help.

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.