Jump to content

CUSTOM CSS ERROR MESSAGE

Go to solution Solved by paul2009,

Recommended Posts

Posted

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

  • Solution
Posted (edited)
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

Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.

Posted
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.

Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.

Posted

Hello @paul2009thank you! Do you know where i can find the second 'closing' tag so I can screenshot for you? Would this issue be affecting our instagram shop?

Many thanks

Amy

Posted
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 🙂

Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.

Posted

Hi @paul2009 so I have deleted and no other error message has appeared! And the issue we were having seems to be rectified. Thank you so much! Should I expect for another error message to appear?

Thanks 

Amy 

Posted
2 hours ago, Amyj said:

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

Great, pleased I could help.

Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.

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.