Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change alternate row colors in datatables

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

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

This change doesnt seem to affect first column in datatables, I can see the new color in other columns.

Can someone please let me know the reason for this issue?

like image 406
Learner Avatar asked Nov 13 '12 20:11

Learner


1 Answers

Solved the issue by using the below css.

    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; }
like image 199
Learner Avatar answered Dec 11 '22 06:12

Learner