datatable jquery – table header width not aligned with body width
CAUSE Most likely your table is hidden initially which prevents jQuery DataTables from calculating column widths. SOLUTION If table is in the collapsible element, you need to adjust headers when collapsible element becomes visible. For example, for Bootstrap Collapse plugin: $(‘#myCollapsible’).on(‘shown.bs.collapse’, function () { $($.fn.dataTable.tables(true)).DataTable() .columns.adjust(); }); If table is in the tab, you need … Read more