Uday Saini
Uday Saini

Reputation: 23

primeNG - implement css style to dataTable

I want to change the colors of the DataTable but I cant implement my custom css to it. Please help me understand how to do it. I ve read the documentation at PrimeNG website.

I did change the thead style using :

.ui-datatable .ui-datatable-thead > tr > th {background: red;}

but i want to know how to use [styleClass] to implement my custom colors to it.

Upvotes: 0

Views: 2183

Answers (2)

Bharat soni
Bharat soni

Reputation: 2786

You can use the below css

.ui-state-default.ui-unselectable-text {
    background-color: red !important;
}

Upvotes: 1

Nilesh Khisadiya
Nilesh Khisadiya

Reputation: 1658

Mark !important tag to your custom styles. May be it will works for you.

.ui-datatable .ui-datatable-thead > tr > th {
   background: red !important;
}

Upvotes: 1

Related Questions