For basic styling add the base class .table
to any <table>
.
# | Table heading | Table heading | Table heading |
---|---|---|---|
1 | Table cell | Table cell | Table cell |
2 | Table cell | Table cell | Table cell |
3 | Table cell | Table cell | Table cell |
Use .table-striped
to add zebra-striping to any table row within the <tbody>
.
# | Table heading | Table heading | Table heading |
---|---|---|---|
1 | Table cell | Table cell | Table cell |
2 | Table cell | Table cell | Table cell |
3 | Table cell | Table cell | Table cell |
Add .table-bordered
for borders on all sides of the table and cells.
# | Table heading | Table heading | Table heading |
---|---|---|---|
1 | Table cell | Table cell | Table cell |
2 | Table cell | Table cell | Table cell |
3 | Table cell | Table cell | Table cell |
Add .table-hover
to enable a hover state on table rows within a <tbody>
.
# | Table heading | Table heading | Table heading |
---|---|---|---|
1 | Table cell | Table cell | Table cell |
2 | Table cell | Table cell | Table cell |
3 | Table cell | Table cell | Table cell |
An example of table with checkbox in every rows.
|
Table heading | Table heading | Table heading |
---|---|---|---|
|
Table cell | Table cell | Table cell |
|
Table cell | Table cell | Table cell |
|
Table cell | Table cell | Table cell |
Use contextual classes to color table rows
.
# | Class Name | Table heading | Table heading | Table heading | Table heading |
---|---|---|---|---|---|
1 | active | Table cell | Table cell | Table cell | Table cell |
2 | success | Table cell | Table cell | Table cell | Table cell |
3 | info | Table cell | Table cell | Table cell | Table cell |
4 | warning | Table cell | Table cell | Table cell | Table cell |
5 | danger | Table cell | Table cell | Table cell | Table cell |
Use contextual classes to color table individual cells
.
# | Table heading | Table heading | Table heading | Table heading | Table heading |
---|---|---|---|---|---|
1 | active | success | info | warning | danger |
2 | active | success | info | warning | danger |
3 | active | success | info | warning | danger |
4 | active | success | info | warning | danger |
5 | active | success | info | warning | danger |
Create responsive tables by wrapping any .table
in .table-responsive
to make them scroll horizontally up to small devices (under 768px). When viewing on anything larger than 768px wide, you will not see any difference in these tables.
# | Table heading | Table heading | Table heading | Table heading | Table heading | Table heading |
---|---|---|---|---|---|---|
1 | Table cell | Table cell | Table cell | Table cell | Table cell | Table cell |
2 | Table cell | Table cell | Table cell | Table cell | Table cell | Table cell |
3 | Table cell | Table cell | Table cell | Table cell | Table cell | Table cell |