The .table-responsive class is intended only to respond to mobile devices ...
From the Bootstrap 3.1.1 documentation ...
Create flexible tables by wrapping any .table in .table-responseive to make them scroll horizontally to small devices (under 768px). When viewed on a screen larger than 768 pixels, you will not see the differences in these tables.
But you can add a class to your css without a media request and get functionality in any viewport.
But note that this does not shorten the table, it only gives a horizontal scrollbar ...
Below are the .table-responsive classes from Bootstrap without a media query limiting it to 768px and below.
.table-responsive { width: 100%; margin-bottom: 15px; overflow-y: hidden; overflow-x: scroll; -ms-overflow-style: -ms-autohiding-scrollbar; border: 1px solid #ddd; -webkit-overflow-scrolling: touch; } .table-responsive>.table { margin-bottom: 0; } .table-responsive>.table>thead>tr>th, .table-responsive>.table>tbody>tr>th, .table-responsive>.table>tfoot>tr>th, .table-responsive>.table>thead>tr>td, .table-responsive>.table>tbody>tr>td, .table-responsive>.table>tfoot>tr>td { white-space: nowrap; }
There are some more CSS rules for .table-bordered that I haven't included ...
Schmalzy
source share