Is it possible to change the background and/or font colors for accordions?

Khaaaan
Khaaaan

Is it possible to change the background color of accordion or even make them transparent?  Is it possible to change the font style and/or color of the text in the accordion?  I can see that links in the body of the accordion will change color based upon style choices, but I can't seem to find how to change the font.

 

I've been mucking about with the CSS, but am a novice (or...whatever's before novice) and not having much luck.  This is not mission critical, but if anyone has any insights, I'd appreciate them.

Comments

  • Kallak
    Kallak
    Posts: 1,090

    It takes having access to custom CSS, but yes you can absolutely change the colors and settings of the accordion (to include transparent background). Here's an example with some random coloration thrown in to illustrate:

    .ui-accordion-header {background-color:blue;color:white !important;border-color:green;}

    .ui-accordion-content {background-color:red;color:white;}

    All the best,
    - Kallak
  • Khaaaan
    Khaaaan
    Posts: 4

    Worked like a charm!  Thanks Kallak!  I was making ot much more difficult than it needed to be.

Sign In or Register to comment.

April 2024
Season of Strife

Read the feature post on the blog
Return to Obsidian Portal

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Discussions