Bootstrap Table Basics: Creating Responsive Tables
☰Fullscreen
Table of Content:
Only Important Code
Basic Table
The .table class adds basic styling (light padding and horizontal dividers) to a table:
Firstname Lastname Ram Doe ram@example.com Shyam Moe shyam@example.com Ramu Dooley ramu@example.com
Full Code For The Above Example
Bootstrap Example Basic Table
The .table class adds basic styling (light padding and horizontal dividers) to a table:
Firstname Lastname Ram Doe ram@example.com Shyam Moe shyam@example.com Ramu Dooley ramu@example.com
Only Important Code
# Firstname Lastname Age City Country Sex Example Example Example Example 1 Rahim Pitt 35 Kolkata India Male Yes Yes Yes Yes
Full Code For The Above Example
Responsive Table
The .table-responsive class creates a responsive table which will scroll horizontally on screens that are less than 992px wide (if needed). When viewing on anything larger than 992px, there is no difference:
# Firstname Lastname Age City Country Sex Example Example Example Example 1 Rahim Pitt 35 Kolkata India Male Yes Yes Yes Yes
Only Important Code
# Firstname Lastname Age City Country Sex Example Example Example Example 1 Rahim Fukle 35 Kolkata India Male Yes Yes Yes Yes
Full Code For The Above Example
Responsive Table
The .table-responsive-sm class creates a responsive table which will scroll horizontally on screens that are less than 576px wide.
Resize the browser window to see the effect.
# Firstname Lastname Age City Country Sex Example Example Example Example 1 Rahim Fukle 35 Kolkata India Male Yes Yes Yes Yes