Применяем такую функцию:
// Определяет ширину DIV вокруг таблицы
function response_table_f(){
$('.table-responsive').hide();
var thisClientWidth = document.body.clientWidth;
if(thisClientWidth <= 767){
var final_width = thisClientWidth - 30;
$('.table-responsive').css('width', final_width);
}
else{
$('.table-responsive').css('width', 'auto');
}
$('.table-responsive').show();
}
response_table_f();
$(window).resize(function(){
response_table_f();
});