0

I used Datatables and I want to customize the pagination to the color I want to match the theme of my page.

enter image description here

This is the default view.

I have tried different methods, like using the same class done in datatables and use !important. It worked but did not show what I intended to do.

What I want when active and also when in :hover state:

  • background-color: black;
  • color: white;

Thanks a lot for the help!

1 Answer 1

1

put below css in your style

.dataTables_wrapper .dataTables_paginate .paginate_button.current, .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover{
    background: rgba(0,0,0,1) !important;
    color:#fff !important;
}
Sign up to request clarification or add additional context in comments.

4 Comments

check if you have added color property with !important somewhere else. if you are using firefox and firebug then you can inspect the element and check in computed tab, which class is actually responsible for the color.
yes i added !important. however I saw in the datatable.css file. it has color: black !important.
you can use the same class structure as datatable.css to override it
still doesn't work. But thanks anyways! You're a huge help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.