0

I have this setup for my table:

$(document).ready(function() {
        $('#example').DataTable({
            dom: 'Bfrtilp',
            responsive: true,
            "order": [[ 1, "desc" ]],
            "lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "Alle"]],
            buttons: [
                {
                    extend: 'copyHtml5',
                    exportOptions: {
                        columns: [ 0, ':visible' ]
                    }
                },
                {
                    extend: 'excelHtml5',
                    title: 'Events export'
                },
                {
                    extend: 'pdfHtml5',
                    title: 'Events export'

                },
                'colvis'
            ],
            "language": {"url": "/vendor/datatables/german.json"}
        });
    });

and it looks like this:

enter image description here

and the problem is that the buttons are not inline with search field and pagination is not inline with "lengthMenu" field.

I want it to be like this:

enter image description here

How can i edit the output for these functions....so they are lined up nicely?

2
  • can you replicate it in a working fiddle and provide the link? that will help in providing a understanding as why it is happening. Modifying the dom parameter in the configuration is probably what is required. Commented Dec 29, 2016 at 21:00
  • it's hard to make all of it but this is the exact example only what i want is bootstrap with this...datatables.net/extensions/buttons/examples/html5/simple.html Commented Dec 29, 2016 at 21:19

1 Answer 1

2

Add this to the head. .btn-group { margin-bottom: -45px;z-index: 2;}

Sign up to request clarification or add additional context in comments.

Comments

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.