Datatable styling so bootstrap button appears on same row as other elements

后端 未结 6 2085
既然无缘
既然无缘 2021-01-30 01:41

I\'m using jQuery DataTables plugin and Bootstrap on my rails site. I can\'t get my custom button and other table header elements to nest in the same row, They are stacked inste

6条回答
  •  天涯浪人
    2021-01-30 02:29

    This is how I did it.

    "dom": '<"row"<"col-6"<"d-flex justify-content-start"<""l><"ml-4"i>>><"col-6"<"d-flex justify-content-end"<""f>>>>tp'
    

    Also add some custom CSS to make things appear more inline.

    div.dataTables_wrapper div.dataTables_info{
       padding-top: 0.2em !important; 
     }
    

提交回复
热议问题