Change accordion color in portfolio post

Hi, I’m trying to change accordion head color in single portfolio post using this code, but it seems no luck:

.x-accordion-heading .x-accordion-toggle.collapsed {
background-color: rgb(28,69,146) !important;
}
.x-accordion-heading .x-accordion-toggle {
background-color: rgba(28,69,146,0.75) !important;
}

The link to the page i mentioned and the admin access i share in secure notes.
Thank you.

Best,
Rendy

Hi Rendy,

Thanks for writing in! Try replacing your code with the following code:

.single-x-portfolio .x-acc .x-acc-header {
    background-color: rgb(28,69,146) !important;
    color: #fff !important;
}

If you would like to learn CSS, I am sharing few resources that you take a look to get started with CSS and an interesting tool that you can use to speed up the development process.

I recommend you to watch following video that will help you to get started with CSS.

https://www.youtube.com/watch?v=MFR4WXiLzpc

Sometimes it can get a bit difficult to find out the right selector to be able to write the required CSS codes. A handy tool that can help you in this is Google Chrome dev tools. I am sharing the resource that you can refer to get started with dev tools.

https://developers.google.com/web/tools/chrome-devtools/css/

https://developers.google.com/web/tools/chrome-devtools/

https://www.youtube.com/watch?v=tP_kXBJWPhQ&t=200s

Hope this helps!

Thank you, other thing, how to make different color when toogle on/off? And how to make the triangle toogle symbol color also into white instead of black?

Best,
Rendy

Hi Rendy,

Please add the code below after the suggested code by my colleague:

.single-x-portfolio .x-acc .x-acc-header.x-active {
    background-color: #ff00ff !important;
}

.single-x-portfolio .x-acc .x-acc-header-indicator {
    color: white !important;
}

Feel free to change #ff00ff to whatever color code you like.

Thank you.

It works perfectly! Thank you so much.

Best,
Rendy

You’re most welcome!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.