Targeting some Tabs

Hi,
I am trying to target a couple of the tabs on my form to change the color of specific tabs. I added a new CSS class and used this code as an example, but it changes all of the tabs. Is there a way to add a CSS class to a specific tab and not the whole TABS container?

Thanks, Rhonda

You can target only specific Tabs container by adding it a CSS class and using it in your code:

/* change tabs background color /
.fd-form .my-element .nav-tabs .nav-link {
background-color: red;
}
/
change active tab background color */
.fd-form .my-element .nav-tabs .active.nav-link {
background-color: yellow;
}

Hello @rhonda,

To change the color of the specific tab, you need to use with CSS and specify the tab position:

/* change the second tab background color */
.fd-form .nav-tabs .nav-item:nth-child(2) {
    background-color: red;
}