I have a table created using HTML and Bootstrap 3 like in the following example.
Even if I set a fixed column width through the width attribute in the colgroup this is not applied and I am not able to set a column width at all here.
Can someone tell me if this needs to be done differently when using Bootstrap 3 or if I am missing something else here?
In this case I want to set the column width of a specific column (here the 3rd one) to 70px.
Example table:
<table class="table table-condensed table-responsive tableDT">
<colgroup>
<col />
<col />
<col width="70px" />
</colgroup>
<thead>
<tr>
<th>Tag</th>
<th>No. of Items</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr>
<td>Some text</td>
<td>Some number</td>
<td><button type='button' class='btn btn-primary btn-xs'>View</button></td>
</tr>
</tbody>
</table>
<th>element. The "width" attribute of the<col>element is obsolete. (Better yet, use CSS.)