I want to change the colors of Bootstrap table-striped. I have read this question: Bootstrap table striped: How do I change the stripe background colour?. So I can change it with, for example:
.table-striped > tbody > tr:nth-child(2n+1) > td,
.table-striped > tbody > tr:nth-child(2n+1) > th
{
background-color: red;
}
However, my apps needs a different color for the "selected row". So I have a CSS class called "selectedRow" that we add it to the tr
that are selected. The property is:
.selectedRow td
{
background-color: blue;
color: black;
}
I need that for the selected row, background color takes precedence over the Bootstrap table-stripped. That is...for the tr
that I add the css class selectedRow
I want them blue, not red. Note that I CANNOT use !important
here (there is a reason for this).
So is there another way I can do to change Bootstrap table-striped so that my selectedRow css class takes precedence?