DataTables and Bootstrap background for odd row not working
DataTables and Bootstrap background for odd row not working
Hello,
I would to know if there is a way to override background color for odd row when using Bootstrap styling.
You can see an example here : https://jsfiddle.net/erfbnw0m/
As you can see, if I use my own class (named "test-custom-background") it works well (only if !important is set to the background property)
But I would like to use default Bootstrap background color (bg-danger, bg-warning, ...)
And the problem is only on the odd row.
If you have a look to the Styles tab in developper tools of the browser, you can see that the style below is priority over bootstrap styling:
.table-striped>tbody>tr:nth-of-type(odd) {
background-color: #f9f9f9;
}
Any idea please?
Thanks in advance and have a nice day.
Lolo.
Replies
I have found a solution, it is not a really nice solution but it works.
You can find it here: https://jsfiddle.net/6249ry3k/1/
But if someone have a better way to do this I will be glad to use it.