Reputation: 28040
I have a simple table from Twitter Bootstrap v3.0.3. It is just 2 columns. Below is the html code for the table.
<table class="table table-bordered">
<thead>
<tr>
<th>Head1</th>
<th>Head2</th>
</tr>
</thead>
<tbody>
<tr>
<td>Address</td>
<td>Test</td>
</tr>
</tbody>
</table>
I would like the columns of the table to be closer to each other. How can this be done? Thank you.
Upvotes: 2
Views: 1028
Reputation: 4546
If I understand correctly, you want the width of the table to fit the content.
The simplest way to do this would be to set width: auto
:
<table class="table table-bordered" style="width: auto">
Upvotes: 4