Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #309835

    I’ve seen a couple posts on how to change tab background colors. That works well, but affects all tabs equally. However, I’m looking for each individual tab to have its own color. Is that possible? If so- how? I’m guessing some sort of targeting with the CSS. Note that the tab labels will not change for this case. Page of reference: (see private content). So for example, ADVENT might be blue, and EPIPHANY would be yellow, etc.
    Your help is appreciated.

    #310194

    Hey Julie!

    Try with this codes:

    .tab_titles [data-fake-id="#tab-id-1"], #tab-id-1-container{
        background: red !important;
    }
    
    .tab_titles [data-fake-id="#tab-id-2"], #tab-id-2-container{
        background: green !important;
    }
    
    .tab_titles [data-fake-id="#tab-id-3"], #tab-id-3-container{
        background: blue !important;
    }
    

    Modify and repeat (that will change the first three tabs).

    Regards,
    Josue

    #310504

    Very good! – If I only want to do this to one particular page on the site, and not others using tabs, what then?

    #310512

    Hey!

    Please edit the code Josue posted and add page id as following

    .page-id-3023 .tab_titles [data-fake-id="#tab-id-1"], #tab-id-1-container{
        background: red !important;
    }
    
    .page-id-3023 .tab_titles [data-fake-id="#tab-id-2"], #tab-id-2-container{
        background: green !important;
    }
    
    .page-id-3023 .tab_titles [data-fake-id="#tab-id-3"], #tab-id-3-container{
        background: blue !important;
    }

    You can right click on Chrome or Firefox to inspect elements to find page ID’s http://i.imgur.com/HyPTCRg.jpg

    Regards,
    Yigit

    #310544

    Hmmm. The CSS isn’t appearing. I’ve placed the code you’ve provided on this page wp-admin/admin.php?page=avia under QUICK CSS. Wrong place? I’ve emptied server cache and browser cache – using FF. No difference in Chrome or IE either.
    I am not including these CSS files in Minify:
    admin-bar
    dashicons
    avia-custom
    cms-navigation-style-base
    avia-dynamic wpml-cms-nav-css

    #310550

    Cache Issue resolved! This was my error instead that the quotes turned into entities when copy/pasting the code. Once fixed, all works well. Close ticket and many thanks!

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Tabs background / tab’ is closed to new replies.