how to left align the Jquery datatable pagination buttons

14,906

Solution 1

You need to use !important to override the existing style applied to the paginator.

.dataTables_paginate {
  float: left !important;
}

Solution 2

div.dataTables_paginate { float: left; margin: 0; } should do the trick.

Share:
14,906
user1457957
Author by

user1457957

Updated on June 04, 2022

Comments

  • user1457957
    user1457957 almost 2 years

    Any ideas on how to left align the Jquery datatable pagination buttons? by default top buttons are aligned center, and bottom buttons are aligned right. Any ideas?

  • user1457957
    user1457957 almost 12 years
    Thank you very much for the quick response. But its not working...i changed in the css file like this:.dataTables_paginate { width: 44px; * width: 50px; float: left; text-align: left; } but still the same way its dispalying.... previously it was right and i changed it to left. Any ideas?
  • sachleen
    sachleen almost 12 years
    @user1457957 Why is there a * in there?
  • user1457957
    user1457957 almost 12 years
    i dont know, it was there by default in the css with datatable example
  • Lusitanian
    Lusitanian almost 12 years
    Hmm, honestly I don't even remember what I did to my instance[s] (I rewrote parts of the JS to make it fit in visually with Bootstrap. I'll look at all of my changes and get back to you later (if someone else doesn't solve this first)
  • jlesse
    jlesse about 7 years
    Any explanation on why this was down voted? It works for me.