Jump to content

Colour change code for accordion

Go to solution Solved by WCS,

Recommended Posts

Hi brains trust,

I have tried changing the colour profile of an accordion in one of my courses but it keeps reverting back to original settings for some reason. 

Could someone assist please with correct CSS to change accordion description text to white (on my brown background).

It's behind a paywall so attached is a screenshot of IDs and my attempted CSS.  The site is: https://www.firstpeoplesleading.com.au/

Screen Shot 2024-03-02 at 9.35.13 am.png

Screen Shot 2024-03-02 at 9.34.22 am.png

Link to comment
  • Solution

@Callan The CSS for this should be:

#block-yui_###### .accordion-item__description{
  color: white !important
}

Is that what you were using previously?

Sometimes CSS doesn't display on the backend unless you save, leave the Custom CSS window, refresh, and then go back in. 

 

Did I help? Click 👍 or mark it as the solution! This helps others find the answers they need. 

Meghan | Westerly Creative Studio
  
 🍪  Still need your website policies?
Termageddon makes it easy.  
Get 10% off your first year! (< affiliate link) 

Link to comment
  • 5 months later...
On 3/2/2024 at 6:51 AM, WCS said:

@Callan The CSS for this should be:

#block-yui_###### .accordion-item__description{
  color: white !important
}

Is that what you were using previously?

Sometimes CSS doesn't display on the backend unless you save, leave the Custom CSS window, refresh, and then go back in. 

 

I've tried adding this same code to Custom CSS but receive the "Syntax Error on line 1" msg. Do you know what might be the issue?

Link to comment

@Rhyan Yes! You need to use the block id # that matches your specific accordion. 

  1. Download this plugin Squarespace ID Finder 
  2. Go to the page with the accordion on your website and click the extension
  3. Find the #block-yui-_#### hovering over the accordion and click it (this will copy it)
  4. Replace the placeholder in the code with the unique block id you just copied

You're also welcome to send me a link to the page and I can do this for you!

Here's what it looks like for my accordion:

Screenshot2024-08-14at10_17_50AM.thumb.png.1dfc2a584e4cf25d5eed1122efda9c04.png

So if I wanted to modify it, I would do:

#block-yui_3_17_2_1_1709332417768_5305 .accordion-item__description{
  color: red !important
}

Did I help? Click 👍 or mark it as the solution! This helps others find the answers they need. 

Meghan | Westerly Creative Studio
  
 🍪  Still need your website policies?
Termageddon makes it easy.  
Get 10% off your first year! (< affiliate link) 

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.