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

Improve your online store with our extensions.
About: Squarespace Circle Leader since 2017. I value honesty, transparency, appreciation and great design ♥.
Work: Squarespace Developer and founder of SF Digital, building the features Squarespace didn't include™.
Content: Links in my posts may refer to SF Digital products or may be affiliate links.

Buy me a coffee

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.

Improve your online store with our extensions.
About: Squarespace Circle Leader since 2017. I value honesty, transparency, appreciation and great design ♥.
Work: Squarespace Developer and founder of SF Digital, building the features Squarespace didn't include™.
Content: Links in my posts may refer to SF Digital products or may be affiliate links.

Buy me a coffee

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 🙂

Improve your online store with our extensions.
About: Squarespace Circle Leader since 2017. I value honesty, transparency, appreciation and great design ♥.
Work: Squarespace Developer and founder of SF Digital, building the features Squarespace didn't include™.
Content: Links in my posts may refer to SF Digital products or may be affiliate links.

Buy me a coffee

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.

Improve your online store with our extensions.
About: Squarespace Circle Leader since 2017. I value honesty, transparency, appreciation and great design ♥.
Work: Squarespace Developer and founder of SF Digital, building the features Squarespace didn't include™.
Content: Links in my posts may refer to SF Digital products or may be affiliate links.

Buy me a coffee

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.