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!

Edited by spacecatind
Initial Revision
Link to comment
  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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.

Improve your online store with our extensions.
About: Squarespace Circle Leader since 2017. I value honesty, transparency, appreciation 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.

Buy me a coffee

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

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.