DataTables 1.10 DOM Pagination position

DataTables 1.10 DOM Pagination position

D3vD3v Posts: 10Questions: 2Answers: 0

I'm using 1.10 and trying to get both the pagination and the information summary to display stacked under the bottom left of the table e.g.:

[table rows and columns]
Displaying page 1 to 5 (15)
Prev 1 2 3 Next

I've tried a number of options from the dom documentation, but the closest I result I get is the two of them displaying next to each other above the top left instead. Thanks in advance, I really appreciate any help on this!

Answers

  • allanallan Posts: 61,920Questions: 1Answers: 10,153 Site admin

    You'll need to use CSS as well for this since the default DataTables CSS floats those two elements.

    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate {
      float: none;
      text-align: center;
    }
    

    http://live.datatables.net/yeleyete/1/edit

    Allan

  • D3vD3v Posts: 10Questions: 2Answers: 0

    Thanks for the tip! I changed the float position in the css:

    .dataTables_wrapper .dataTables_paginate {
    float: left;
    text-align: right;
    padding-top: 0.25em;
    }

    They both appear on the bottom left next to each other, but how would I get the pagination to appear below the information summary?

  • allanallan Posts: 61,920Questions: 1Answers: 10,153 Site admin

    You've got them floating with that CSS, so yes, they would float next to each other. You'd need to alter that - perhaps using the CSS I suggested above.

    Allan

This discussion has been closed.