How to show export buttons at the bottom of the table

How to show export buttons at the bottom of the table

becarefuldtbecarefuldt Posts: 5Questions: 2Answers: 0

$(document).ready(function() {
$('#example').DataTable( {
dom: 'Bfrtip',
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print'
]
will place buttons at the top of the table - But I would look to show them at the bottom -how does one do this - or to the side or in the footer or where ever?

This question has accepted answers - jump to:

Answers

  • allanallan Posts: 61,822Questions: 1Answers: 10,127 Site admin
    Answer ✓

    Put the B option at the end of the dom string. See the dom documentation for details.

    Allan

  • becarefuldtbecarefuldt Posts: 5Questions: 2Answers: 0

    That worked and I appreciate the feedback - But I am not finding the dom page very understandable and can't derive that answer from the page. Is it possible? Because now that I have the buttons at the bottom I would like to move them to the right slightly from their default location. Is that possible?

  • allanallan Posts: 61,822Questions: 1Answers: 10,127 Site admin
    Answer ✓

    The dom parameter positions the elements in the DOM. CSS also have an impact on their layout in the document visually. You might have to add float:right for example to the element.

    Allan

  • becarefuldtbecarefuldt Posts: 5Questions: 2Answers: 0

    That worked I added
    div.dt-buttons{
    position:relative;
    float:right;
    }
    to our css

    Thanks

This discussion has been closed.