Reputation: 5
It possibile to override primefaces theme css, and make table with more colored lines according value in row?
I want to colored rows accroding some values in row... for example missing value in some column, so i put red background on this row. It doesnt depend on odd and even row or any mathematical expression.
I made my css override all things from theme, put this css after prime faces. All works, but its possible to access the row css regardless odd and even row like this?
.ui-datatable-odd
{
background-color: white;
}
.ui-datatable-even
{
background-color: black;
}
Upvotes: 0
Views: 1405
Reputation: 21
I think you would be able to do it like this:
li:nth-child(2n+1) { background-color: white;} /* for odd rows */
li:nth-child(2n) { background-color: black; } /* for even rows */
Upvotes: 2