Try adding autoWidthtofalse
$('#example').dataTable( {
"autoWidth": false
} );
Or you can resize()table at window resize event
$(window).resize(function () {
$("#example").resize();
});
Edit
On my local computer, this code only works with add "autoWidth": falseand removes scrollYor"scrollY":""
$('#tblOpWaiting').DataTable({
"bFilter" : false,
"ordering" : false,
"scrollY" : "",
"scrollCollapse" : true,
responsive : true,
"paging" : false,
autoWidth:false
});
$('#tblOpConsulted').DataTable({
"bFilter" : false,
"ordering" : false,
"scrollY" : "",
"scrollCollapse" : true,
responsive : true,
"paging" : false,
autoWidth:false
});
source
share