Add .table-borderless for a table without borders.
#
First
Last
Handle
1
Mark
Otto
@mdo
2
Jacob
Thornton
@fat
3
Larry the Bird
@twitter
<tableclass="table table-borderless">
<thead>
<tr>
<thscope="col">#</th>
<thscope="col">First</th>
<thscope="col">Last</th>
<thscope="col">Handle</th>
</tr>
</thead>
<tbody>
<tr>
<thscope="row">1</th>
<td>Mark</td>
<td>Otto</td>
<td>@mdo</td>
</tr>
<tr>
<thscope="row">2</th>
<td>Jacob</td>
<td>Thornton</td>
<td>@fat</td>
</tr>
<tr>
<thscope="row">3</th>
<tdcolspan="2">Larry the Bird</td>
<td>@twitter</td>
</tr>
</tbody>
</table>
Sizes
Add .table-sm to make any .table more compact.
#
First
Last
Handle
1
Mark
Otto
@mdo
2
Jacob
Thornton
@fat
3
Larry
the Bird
@twitter
<tableclass="table table-sm">
<thead>
<tr>
<thscope="col">#</th>
<thscope="col">First</th>
<thscope="col">Last</th>
<thscope="col">Handle</th>
</tr>
</thead>
<tbody>
<tr>
<thscope="row">1</th>
<td>Mark</td>
<td>Otto</td>
<td>@mdo</td>
</tr>
<tr>
<thscope="row">2</th>
<td>Jacob</td>
<td>Thornton</td>
<td>@fat</td>
</tr>
<tr>
<thscope="row">3</th>
<td>Larry</td>
<td>the Bird</td>
<td>@twitter</td>
</tr>
</tbody>
</table>
Or make it bigger using .table-lg class.
#
First
Last
Handle
1
Mark
Otto
@mdo
2
Jacob
Thornton
@fat
3
Larry
the Bird
@twitter
<tableclass="table table-lg">
<thead>
<tr>
<thscope="col">#</th>
<thscope="col">First</th>
<thscope="col">Last</th>
<thscope="col">Handle</th>
</tr>
</thead>
<tbody>
<tr>
<thscope="row">1</th>
<td>Mark</td>
<td>Otto</td>
<td>@mdo</td>
</tr>
<tr>
<thscope="row">2</th>
<td>Jacob</td>
<td>Thornton</td>
<td>@fat</td>
</tr>
<tr>
<thscope="row">3</th>
<td>Larry</td>
<td>the Bird</td>
<td>@twitter</td>
</tr>
</tbody>
</table>
Vertical alignment
Table cells of <thead> are always vertical aligned to the bottom. Table cells in <tbody> inherit their alignment from <table> and are aligned to the top by default. Use the vertical align classes to re-align where needed.
Heading 1
Heading 2
Heading 3
Heading 4
This cell inherits vertical-align: middle; from the table
This cell inherits vertical-align: middle; from the table
This cell inherits vertical-align: middle; from the table
This here is some placeholder text, intended to take up quite a bit of vertical space, to demonstrate how the vertical alignment works in the preceding cells.
This cell inherits vertical-align: bottom; from the table row
This cell inherits vertical-align: bottom; from the table row
This cell inherits vertical-align: bottom; from the table row
This here is some placeholder text, intended to take up quite a bit of vertical space, to demonstrate how the vertical alignment works in the preceding cells.
This cell inherits vertical-align: middle; from the table
This cell inherits vertical-align: middle; from the table
This cell is aligned to the top.
This here is some placeholder text, intended to take up quite a bit of vertical space, to demonstrate how the vertical alignment works in the preceding cells.
<divclass="table-responsive">
<tableclass="table align-middle">
<thead>
<tr>
<thscope="col"class="w-25">Heading 1</th>
<thscope="col"class="w-25">Heading 2</th>
<thscope="col"class="w-25">Heading 3</th>
<thscope="col"class="w-25">Heading 4</th>
</tr>
</thead>
<tbody>
<tr>
<td>This cell inherits <code>vertical-align: middle;</code> from the table</td>
<td>This cell inherits <code>vertical-align: middle;</code> from the table</td>
<td>This cell inherits <code>vertical-align: middle;</code> from the table</td>
<td>This here is some placeholder text, intended to take up quite a bit of vertical space, to demonstrate how the vertical alignment works in the preceding cells.</td>
</tr>
<trclass="align-bottom">
<td>This cell inherits <code>vertical-align: bottom;</code> from the table row</td>
<td>This cell inherits <code>vertical-align: bottom;</code> from the table row</td>
<td>This cell inherits <code>vertical-align: bottom;</code> from the table row</td>
<td>This here is some placeholder text, intended to take up quite a bit of vertical space, to demonstrate how the vertical alignment works in the preceding cells.</td>
</tr>
<tr>
<td>This cell inherits <code>vertical-align: middle;</code> from the table</td>
<td>This cell inherits <code>vertical-align: middle;</code> from the table</td>
<tdclass="align-top">This cell is aligned to the top.</td>
<td>This here is some placeholder text, intended to take up quite a bit of vertical space, to demonstrate how the vertical alignment works in the preceding cells.</td>
</tr>
</tbody>
</table>
</div>
Responsive tables
Responsive tables allow tables to be scrolled horizontally with ease. Make any table responsive across all viewports by wrapping a .table with .table-responsive. Or pick a maximum breakpoint with which to have a responsive table up to by using .table-responsive{-sm|-md|-lg|-xl|-xxl}.
#
Heading
Heading
Heading
Heading
Heading
Heading
Heading
Heading
Heading
1
Cell
Cell
Cell
Cell
Cell
Cell
Cell
Cell
Cell
2
Cell
Cell
Cell
Cell
Cell
Cell
Cell
Cell
Cell
3
Cell
Cell
Cell
Cell
Cell
Cell
Cell
Cell
Cell
<divclass="table-responsive">
<tableclass="table">
<thead>
<tr>
<thscope="col">#</th>
<thscope="col">Heading</th>
<thscope="col">Heading</th>
<thscope="col">Heading</th>
<thscope="col">Heading</th>
<thscope="col">Heading</th>
<thscope="col">Heading</th>
<thscope="col">Heading</th>
<thscope="col">Heading</th>
<thscope="col">Heading</th>
</tr>
</thead>
<tbody>
<tr>
<thscope="row">1</th>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
</tr>
<tr>
<thscope="row">2</th>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
</tr>
<tr>
<thscope="row">3</th>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
</tr>
</tbody>
</table>
</div>
Use .table-responsive{-sm|-md|-lg|-xl|-xxl} as needed to create responsive tables up to a particular breakpoint. From that breakpoint and up, the table will behave normally and not scroll horizontally.
Table nowrapExclusive
.table-nowrap class prevents the text in a table cell from wrapping. Especially useful when used with responsive tables.
Name
Email
Address
ID
Amanda Bright
felis@icloud.ca
1590 Orci Rd.
19F7E8C5-624A-11C3-6BC6-87532CF723D8
Vernon Riley
maecenas.ornare.egestas@hotmail.com
5382 Tincidunt, Av.
4D1C8A0E-B827-87A6-9789-76741E8E63E9
Oliver Colon
auctor.nunc@yahoo.ca
P.O. Box 452, 142 Consequat Av.
CEA658BB-80DC-EFC1-2E64-94AAD2422D74
Lesley Butler
urna.nullam.lobortis@aol.ca
4126 Ligula. St.
91642D86-349B-928C-384D-75D925D88519
Donna Chambers
in@google.edu
820-7112 Pellentesque. Road
E4602D99-9DC0-34B6-839D-7E421A95621C
<divclass="table-responsive">
<tableclass="table table-nowrap">
<tr>
<th>Name</th>
<th>Email</th>
<th>Address</th>
<th>ID</th>
</tr>
<tr>
<td>Amanda Bright</td>
<td>felis@icloud.ca</td>
<td>1590 Orci Rd.</td>
<td>19F7E8C5-624A-11C3-6BC6-87532CF723D8</td>
</tr>
<tr>
<td>Vernon Riley</td>
<td>maecenas.ornare.egestas@hotmail.com</td>
<td>5382 Tincidunt, Av.</td>
<td>4D1C8A0E-B827-87A6-9789-76741E8E63E9</td>
</tr>
<tr>
<td>Oliver Colon</td>
<td>auctor.nunc@yahoo.ca</td>
<td>P.O. Box 452, 142 Consequat Av.</td>
<td>CEA658BB-80DC-EFC1-2E64-94AAD2422D74</td>
</tr>
<tr>
<td>Lesley Butler</td>
<td>urna.nullam.lobortis@aol.ca</td>
<td>4126 Ligula. St.</td>
<td>91642D86-349B-928C-384D-75D925D88519</td>
</tr>
<tr>
<td>Donna Chambers</td>
<td>in@google.edu</td>
<td>820-7112 Pellentesque. Road</td>
<td>E4602D99-9DC0-34B6-839D-7E421A95621C</td>
</tr>
</table>
</div>
Table edgeExclusive
.table-edge shifts <thead> outside with the width of cell padding on the x axis. Mostly used inside cards. It gives them a clean style.