Jump to content

How to target a specific list item for CSS

Recommended Posts

I'm trying to target specific list items (with cards) for color changes. I was able to make it work once using this code in Custom CSS: 

  • #yui_3_17_2_1_1632946292246_406 [data-is-card-enabled="true"] {background-color: #23479f}

but later discovered that #yui codes change every time the page is refreshed. I also haven't been able to change anything but the border color, using this code at the moment:

.list-item:nth-child(3) [data-is-card-enabled="true"] {border:5px solid darkblue}

Which 1) changes the border instead of the background-color, and 2) changes every list on the site instead of just one. Any help on this would be greatly appreciated. Thanks!

 

P.S. The site currently is not approved for public view, but I can remove some elements and give the URL if necessary. Thanks again!

Link to comment
  • Replies 1
  • Views 1.1k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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.