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 (< 768px).
Name | Access | Actions | ||
---|---|---|---|---|
![]() |
Ann Parker | client1@example.com | VIP |
|
![]() |
Amanda Powell | client2@example.com | Disabled |
|
![]() |
Lisa Gordon | client3@example.com | Personal |
|
![]() |
Sara Holland | client4@example.com | Disabled |
|
![]() |
Megan Dean | client5@example.com | Disabled |
|
Partial Table
The second way is to use specific CSS classes for hiding columns in various screen resolutions. This way you can hide the less important columns and keep the most valuable on mobiles. 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 | Actions | ||
---|---|---|---|
![]() |
Joshua Munoz | client1@example.com |
|
![]() |
Vincent Sims | client2@example.com |
|
![]() |
John Parker | client3@example.com |
|
![]() |
Vincent Sims | client4@example.com |
|
![]() |
Roger Hart | client5@example.com |
|
Helper Classes
Extra small devices Phones (<768px) |
Small devices Tablets (≥768px) |
Medium devices Desktops (≥992px) |
Large devices Desktops (≥1200px) |
|
---|---|---|---|---|
.visible-xs |
||||
.visible-sm |
||||
.visible-md |
||||
.visible-lg |
||||
.hidden-xs |
||||
.hidden-sm |
||||
.hidden-md |
||||
.hidden-lg |