Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

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


spacecatind

Question

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!

Edited by spacecatind
Initial Revision
Link to post
  • Answers 5
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

5 answers to this question

Recommended Posts

  • 1

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.

sf-digital-signature-logo-email145.png.46606a2288a2847f44d81b9b7b58f3a5.png
Hi, I'm Paul, founder of SF Digital, a specialist company helping Squarespace users by building the features that Squarespace didn't include.
Explore our range of Squarespace Extensions, including the Wishlist, and Datepicker Extension or book a Squarespace Expert for 1:1 help. Note that links in my posts may be affiliate links.

Link to post
  • 0

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 post
  • 0

Try this plugin (I haven't used yet) https://www.squarewebsites.org/products/blocks-classes

You can send your question to my email to get faster answer. / How to Setup Password & Share URL 

-- I'm Tuan, work for a non-profit project (build free libraries). I check the forum once or twice a day to help out the community. If you don't see me answering your question, you can send it to the email above. 

Link to post
  • 0
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>

 

You can send your question to my email to get faster answer. / How to Setup Password & Share URL 

-- I'm Tuan, work for a non-profit project (build free libraries). I check the forum once or twice a day to help out the community. If you don't see me answering your question, you can send it to the email above. 

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...