0

I want to apply custom CSS on lightning:tab of lightning:tabset I tried using inline CSS, external CSS but there is no luck, I want a way to check below:

(Used to create tab section which is highlighted)

.THIS li:nth-child(2) {
    background-color: dodgerblue !important;
    color: white !important;
    height:1.5rem;
    cursor: no-drop !important;
    pointer-events: none;
    
}
.THIS li:nth-child(7) {
    background-color: dodgerblue !important;
    color: white !important;
    height:1.5rem;
    cursor: no-drop !important;
    pointer-events: none;
}

.THIS li:nth-child(12) {
    background-color: dodgerblue !important;
    color: white !important;
    height:1.5rem;
    cursor: no-drop !important;
    pointer-events: none;
}
.THIS li:nth-child(15) {
    background-color: dodgerblue !important;
    color: white !important;
    height:1.5rem;
    cursor: no-drop !important;
    pointer-events: none;
}

This worked, anyhow I need some other solution as I am getting tabs dynamically there can be "n" number of tabs. and updating the CSS on every tab insertion/deletion is Misery!

Please let me know if anyone has any solution

Many thanks in advance!

1 Answer 1

0

If you have to use !important in your CSS, maybe your .css files are included in the wrong order. check the element/style section in your browser's developer tools and find the files that are overriding the style of your tables.

Sign up to request clarification or add additional context in comments.

2 Comments

I checked there is no other style overriding the custom Css.
It's strange, can you see your custom style in dev tools? maybe your style isn't targeting the HTML tags. Share a screenshot or something.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.