This topic has 8 replies, 2 voices, and was last updated 6 years, 10 months ago ago by Rose Tyler
Hi there. The page in question listed in private content.
I’d like each tab header (.vc_tta-tab) to have a different background colour, and hover colour.
I can change the colour of ALL of them, but not each individual one. And if I add a custom style to the tab section in VC, it assigns it to the tab content, not the header.
Any ideas?
Thanks in advance.
Reuben.
Hello,
You may use this code in Custom css for your page:
.wpb-js-composer .vc_tta-tabs-list .vc_tta-tab:first-child span {
color: red;
}
.wpb-js-composer .vc_tta-tabs-list .vc_tta-tab:nth-child(2) span {
color: black;
}
.wpb-js-composer .vc_tta-tabs-list .vc_tta-tab:nth-child(3) span {
color: red;
}
.wpb-js-composer .vc_tta-tabs-list .vc_tta-tab:nth-child(4) span {
color: black;
}
.wpb-js-composer .vc_tta-tabs-list .vc_tta-tab:nth-child(5) span {
color: red;
}
.wpb-js-composer .vc_tta-tabs-list .vc_tta-tab:nth-child(6) span {
color: black;
}
.wpb-js-composer .vc_tta-tabs-list .vc_tta-tab:nth-child(7) span {
color: red;
}
.wpb-js-composer .vc_tta-tabs-list .vc_tta-tab:nth-child(8) span {
color: black;
}
and for the hover:
.wpb-js-composer .vc_tta-tab:nth-child(1)>a:hover{
color: black;
}
.wpb-js-composer .vc_tta-tab:nth-child(2)>a:hover{
color: #402f24;
}
.wpb-js-composer .vc_tta-tab:nth-child(3)>a:hover{
color: black;
}
.wpb-js-composer .vc_tta-tab:nth-child(4)>a:hover{
color: #402f24;
}
.wpb-js-composer .vc_tta-tab:nth-child(5)>a:hover{
color: black;
}
.wpb-js-composer .vc_tta-tab:nth-child(6)>a:hover{
color: #402f24;
}
.wpb-js-composer .vc_tta-tab:nth-child(7)>a:hover{
color: black;
}
.wpb-js-composer .vc_tta-tab:nth-child(8)>a:hover{
color: #402f24;
}
Regards
Hey Rose. Thanks. Not quite what i meant though.
It’s the background colour of the tab I’d like to change. Although i tried using ‘background-color’ and only changes the area around the tab title!
Please use this code:
.wpb-js-composer .vc_tta-color-white.vc_tta-style-flat .vc_tta-tab:nth-child(1)>a{
background-color:white;
}
.wpb-js-composer .vc_tta-color-white.vc_tta-style-flat .vc_tta-tab:nth-child(1)>a:hover{
background-color:red;
}
Regards
Cool! So i switched the font colour to white, but would like the active tab to be black. Can’t get it to work!
Also, how can i stop the hover effect for the active tab?
Thanks again Rose!
.wpb-js-composer .vc_tta-color-white.vc_tta-style-flat .vc_tta-tab.vc_active>a span {
color: black;
}
Also, how can i stop the hover effect for the active tab?
– you may only set own active background color for this for all tabs together via custom css:
.wpb-js-composer .vc_tta-color-white.vc_tta-style-flat .vc_tta-tab.vc_active>a {
background-color: red;
}
Regards
Thanks Rose. I achieved the same effect using:
.wpb-js-composer .vc_tta-color-white.vc_tta-style-flat .vc_tta-tab.vc_active>a:hover{
background-color:white ;
}
You’re welcome!
Regards
The issue related to '‘Tab styling.’' has been successfully resolved, and the topic is now closed for further responses