Why does the buttons not move to the right of the search box.

Why does the buttons not move to the right of the search box.

HGPKKHGPKK Posts: 7Questions: 1Answers: 0

Hello! I have a simple requirement to move the buttons to the right of the search box. I have tried the other options that are provided in the different threads in this site but none of them worked for me. Theoretically, the below simple code should have worked, unless, I am understanding the concept incorrect. Any help would be greatly appreciated. Thanks in advance!.

dom:'fBrtilp',
buttons: [
'excelHtml5',
'pdfHtml5',
'print'
],

This question has an accepted answers - jump to answer

Answers

  • jLinuxjLinux Posts: 981Questions: 73Answers: 75

    Can you go to live.datatables.net and get a working example of what you mean? When you say "search box", I think of the searching feature, which doesn't have a button, (as seen in this basic example)

  • HGPKKHGPKK Posts: 7Questions: 1Answers: 0

    The buttons I mentioned are the Print, Export and Pdf . By default they are placed on the left top corner of the screen.

    If I add the following code in my css to override the default. the buttons move to the right but still stay on the right side of my searching option instead of moving to the left side..

    div.dt-buttons {
    float: right;
    }
    (Please see the attached pic).

    Only if I remove the searching option, does the buttons move to the right.

    Any help would be great.

    Thanks!!

  • allanallan Posts: 63,161Questions: 1Answers: 10,406 Site admin
    Answer ✓

    Just put the B before the f if you want the Buttons on the right: http://live.datatables.net/zajikele/1/edit . Then it is the first right floated element.

    Allan

  • HGPKKHGPKK Posts: 7Questions: 1Answers: 0

    Absolutely beautiful. Thank you, Thank you!

This discussion has been closed.