Responsive Tables
Full Table
The first way to make a table responsive is to wrap it with <div class="table-responsive"></div>
. This way, the table will be horizontally scrollable and all data will be accessible on smaller screens. You could also append the following modifiers to the table-responsive
to apply the horizontal scrolling on different screen widths: -sm
, -md
, -lg
, -xl
.
Name | Access | Actions | ||
---|---|---|---|---|
Carol White | client1@example.com | Personal |
|
|
Carol White | client2@example.com | Personal |
|
|
Amber Harvey | client3@example.com | Personal |
|
|
Amanda Powell | client4@example.com | Trial |
|
|
Helen Jacobs | client5@example.com | Trial |
|
Partial Table
The second way is to use responsive utility CSS classes for hiding columns in various screen resolutions. This way you can hide less important columns and keep the most valuable on smaller screens. At the following example the Access column isn't visible on small and extra small screens and Email column isn't visible on extra small screens.
Name | Access | Actions | ||
---|---|---|---|---|
Amber Harvey | client1@example.com | Personal |
|
|
Danielle Jones | client2@example.com | VIP |
|
|
Alice Moore | client3@example.com | VIP |
|
|
Lori Moore | client4@example.com | Disabled |
|
|
Judy Ford | client5@example.com | Trial |
|