I have implemented a table in my bootstrap project and I am looking to group columns together. Are there any built-in options in bootstrap that allow for this? While I am open to writing custom CSS if necessary, I would prefer to use a native feature in bootstrap.
Specifically, I would like to apply one background color to the Current
columns and a different color to the New
columns within the table.
<table>
<thead>
<tr>
<td></td>
<td colspan="2" style="text-align: center;">Current</td>
<td colspan="2" style="text-align: center;">New</td>
</tr>
<tr>
<th>ID</th>
<th>First Name</th>
<th>Last Name</th>
<th>Fisrt Name</th>
<th>Last Name</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>John</td>
<td>Bauer</td>
<td>Jack</td>
<td>Bauer</td>
</tr>
</tbody>
</table>
UPDATE: After some tinkering with colgroup
and minimal custom CSS, I was able to achieve a partial solution: http://jsfiddle.net/75v7W/4/