Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #797574

    Hey guys,

    I would like to make one accordion that has 7 expandable boxes, to each have different colors. And I don’t want it to interfere with other accordions in the same post.

    How is the best way to do this?

    Thanks.

    #797610

    Hey FlatText,

    Try to enabling custom css classes http://kriesi.at/documentation/enfold/turn-on-custom-css-field-for-all-alb-elements/ then in the class name add my-accordion

    Then in Quick CSS (located in Enfold > General Styling), add this css code:

    
    .my-accordion > .av_toggle_section:nth-child(1) .toggler {
        background-color: blue;
    }
    
    .my-accordion > .av_toggle_section:nth-child(1) .toggle_content {
        background: blue;
    }
    
    .my-accordion > .av_toggle_section:nth-child(2) .toggler {
        background-color: green;
    }
    
    .my-accordion > .av_toggle_section:nth-child(2) .toggle_content {
        background: green;
    }
    
    .my-accordion > .av_toggle_section:nth-child(3) .toggler {
        background-color: yellow;
    }
    
    .my-accordion > .av_toggle_section:nth-child(3) .toggle_content {
        background: yellow;
    }
    
    .my-accordion > .av_toggle_section:nth-child(4) .toggler {
        background-color: red;
    }
    
    .my-accordion > .av_toggle_section:nth-child(4) .toggle_content {
        background: red;
    }
    
    .my-accordion > .av_toggle_section:nth-child(5) .toggler {
        background-color: gray;
    }
    
    .my-accordion > .av_toggle_section:nth-child(5) .toggle_content {
        background: gray;
    }
    
    .my-accordion > .av_toggle_section:nth-child(6) .toggler {
        background-color: orange;
    }
    
    .my-accordion > .av_toggle_section:nth-child(6) .toggle_content {
        background: orange;
    }
    
    .my-accordion > .av_toggle_section:nth-child(7) .toggler {
        background-color: purple;
    }
    
    .my-accordion > .av_toggle_section:nth-child(7) .toggle_content {
        background: purple;
    }

    toggler is for the title and toggle_content for the content. Just adjust the background colors as you see fit. Hope this helps :)

    Best regards,
    Nikko

    #797617

    Thank you Nikko.

    Perfect

    #797631

    Hi,

    We’re glad that Nikko was able to help you! If you have any other questions or issues, feel free to post them here on the forum.

    For your information, you can take a look at Enfold documentation here – http://kriesi.at/documentation/enfold/

    We’d also appreciate it if you can take a moment to review our theme if you haven’t already. https://themeforest.net/downloads

    Thank you for using Enfold!

    Cheers!
    Sarah

    #800110

    Hi Nikko,

    Can you point me to the correct CSS so I can do the same on the Tab elements? Or should I start a new thread?

    Thank you

    #800340

    Hi,

    Are you referring to the first tab shown here: http://kriesi.at/themes/enfold-2017/elements/tabs/ ?

    Best regards,
    Nikko

    #800545

    Hi Nikko,

    Yes, but not just the first tab. I want to be able to change the individual tab colors. Just like you showed me with the accordion earlier in the thread.

    #800964

    Hi,

    Like Nikko said, please give a class name to your Tabs Element, then You can use this code as basis.

    .my-tabs .tab:nth-child(1) {
        background-color: blue !important;
    }
    
    .my-tabs #tab-id-1-container {
        background-color: blue !important;
    }
    

    Please let us know if you need further help!

    Best regards,
    Sarah

    #800989

    Thank you, Sarah.

    Exactly what I needed.

    #801028

    Hi,

    Glad that Sarah helped you :) Let us know if you need more assistance or if we can close the thread.

    Best regards,
    Nikko

    #801033

    Please close this thread. You guys have been a huge help. Thanks again!

    #801038

    Hi,

    You’re very much welcome. Thanks for using Enfold :)

    Best regards,
    Nikko

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Accordion color’ is closed to new replies.