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
  • 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: Squarespace Circle Leader since 2017. I value honesty, transparency, diversity 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.

Catch up on all the release notes and announcements 2023 [for Circle members only]. There's a public version here too!
If I helped, you can thank me by clicking one of the emojis below. If you prefer, you can buy me a coffee.
Improve your online store with our extensions.

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

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

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.