KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Change striped color for odd rows of Table #2167

Closed Epitello opened this topic on on Jun 28, 2021 - 4 comments

E
Epitello commented on Jun 28, 2021

Hello team, I try to change the background color of the striped lines but when I use css all the lines change color instead of one in two. You have an idea ? Thanks by advance.

E
Epitello commented on Jun 28, 2021

i send you the css code :

<style>
    .table-striped > tbody > tr:nth-child(2n+1) > td, .table-striped > tbody > tr:nth-child(2n+1) > th{
        background-color : black;
    }
</style>
E
Epitello commented on Jun 28, 2021

Is it possible to know the row id in custom attr function ?

S
Sebastian Morales commented on Jun 29, 2021

Pls try replacing this CSS selector:

.table-striped > tbody

with this one:

#myTable tbody

where "myTable" is the id/name of your Table/DataTables widget or the parent div of your table. Rgds,

E
Epitello commented on Jun 29, 2021

it's work fine thanks

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
help needed
solved

DataGrid