Style – Tables
Default styles
For basic styling—light padding and only horizontal dividers—add the base class .table
to any <table>
.
<table> … </table>
docs-example”>
# | First Name | Last Name | Username |
---|---|---|---|
1 | Mark | Otto | @mdo |
2 | Jacob | Thornton | @fat |
3 | Larry | the Bird |
<table> … </table>
.table-bordered
Add borders and rounded corners to the table.
<table> … </table>
.table-hover
Enable a hover state on table rows within a <tbody>
.
<table> … </table>
.table-condensed
Makes tables more compact by cutting cell padding in half.
<table> … </table>
.success
.error
.warning
.info
... <tr class="success"> <td>1</td> <td>TB - Monthly</td> <td>01/04/2012</td> <td>Approved</td> </tr> ...
<table>
<thead>
<tr>
) to label table columns<tbody>
<tr>
) in the body of the table<tr>
<td>
or <th>
) that appears on a single row<td>
<th>
<thead>
<caption>
<table> <caption>...</caption> <thead> <tr> <th>...</th> <th>...</th> </tr> </thead> <tbody> <tr> <td>...</td> <td>...</td> </tr> </tbody> </table>