Change alternate row colors in datatables

I am trying to change the color of rows in a datatable using the CSS below.

table.dataTable tr.odd { background-color: #E2E4FF; } table.dataTable tr.even { background-color: white; } 

This change does not seem to affect the first column in datatables, I see a new color in other columns.

Can someone please tell me the cause of this problem?

+4
source share
1 answer

Fixed the issue using the css below.

  table.dataTable td.sorting_1{ background-color: white; border:1px lightgrey; } table.dataTable td{ background-color: white; border:1px lightgrey;} table.dataTable tr.odd { background-color: white; border:1px lightgrey;} table.dataTable tr.even{ background-color: white; border:1px lightgrey; } 
+12
source

Source: https://habr.com/ru/post/1445858/


All Articles