Jump to content

Do we not have the ability to add class and id selectors to custom HTML and then target them in CSS?

Recommended Posts

I'm just trying to style some custom HTML lists for a course catalog page and the class selector doesn't target as it would under any other circumstance. I found a forum post from 2014 requesting this capability, I had hoped that because it was from 5 years ago, they may have implemented that ability. Basically, I am just trying to target these specific lists, leaving the rest on the site as they are. Any advice?

Thanks!

Link to comment
  • Replies 5
  • Views 2.9k
  • Created
  • Last Reply

No, you can’t add classes or IDs using the standard version, but you can target specific classes on certain pages using collection and item IDs or classes.

About me: I'm Paul, a SQSP user for over 18 yrs and a Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL, providing 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 below. Buying a coffee is optional.

Book paid help with domains: Connect a GoDaddy domain. Connect a Squarespace Domain. Domain assistance

Link to comment
  • 6 months later...

I have been trying to add a class to my Google Social Link so that I can update the icon. Squarespace uses a generic URL icon for Google link for some reason??

I have been able to select the links using querySelectorAll but it wont let me add a class to the elements. The console says .addClass and .classList.add are not functions. 

Did you ever find a solution?

Link to comment
6 hours ago, thatguy said:

I have been trying to add a class to my Google Social Link so that I can update the icon. Squarespace uses a generic URL icon for Google link for some reason??

I have been able to select the links using querySelectorAll but it wont let me add a class to the elements. The console says .addClass and .classList.add are not functions. 

Did you ever find a solution?

Did you use jQuery? 

Have you declared jQuery library yet?

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>

 

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.