0

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.

Uday Saini
  • 23
  • 1
  • 8
  • can you add your HTML and full CSS please? – ZombieChowder Jun 30 '17 at 09:24
  • Possible duplicate of [What is Best way to override the style of primeng components?](https://stackoverflow.com/questions/40131174/what-is-best-way-to-override-the-style-of-primeng-components) – Aravind Jul 02 '17 at 01:05

2 Answers2

1

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

.ui-datatable .ui-datatable-thead > tr > th {
   background: red !important;
}
Nilesh Khisadiya
  • 1,560
  • 2
  • 15
  • 27
1

You can use the below css

.ui-state-default.ui-unselectable-text {
    background-color: red !important;
}
Bharat soni
  • 2,686
  • 18
  • 27