Jump to content

Custom CSS code applied prior to linked code

Recommended Posts

Hello,

I'm linking a style sheet into my code through code injection (header), and I would like to override some of the styles from the linked css through my own custom css in the CSS editor. But I've noticed that the custom CSS is being implemented before the linked CSS, causing the reverse effect of the linked CSS overriding the custom CSS.  Is there a way to work around this?

This is how it appears in the DOM:

image.png.d456967d4ca1230ec18c28fdc5f9e5a0.png

 

And here is how the CSS is being overridden.

image.png.8524c2bd7437bd00790110ea9ee23997.png

 

Thanks!

 

Link to comment
  • Replies 4
  • Views 1.1k
  • Created
  • Last Reply
2 minutes ago, erichow said:

is there a better way than applying !important to every single value?

There are 3 ways to insert CSS

  • Wrap CSS in style tag and insert to Header
  • Insert to Custom CSS
  • Add !important to Custom CSS

You can test all.

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.