Change color of Datatable pagination

Topic: Change color of Datatable pagination

Giulio Marcon asked 4 years ago

How do I change the color of the pagination generated inside the datatable? I tried changing the background color using the js that I found here, but when I click the column header to "sort" the rows, the color changes back to the default one.

Marta Szymanska staff pro premium answered 4 years ago

Hi, try this CSS code:
.pagination .page-link { background-color: #000; }

div.dataTables_wrapper div.dataTables_paginate ul.pagination .page-link:focus {
background-color: #000;

.pagination .page-link:hover {
background-color: #000;
Best, Marta
Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.



Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.5.10
  • Device: Desktop
  • Browser: Any
  • OS: Any
  • Provided sample code: No
  • Provided link: Yes