Bootstrap 3:
Why fight it? Why not simply control your table width using the bootstrap grid?
<div class="row">
<div class="col-sm-6">
<table></table>
</div>
</div>
This will create a table that is half (6 out of 12) of the width of the containing element.
I sometimes use inline styles as per the other answers, but it is discouraged.
Bootstrap 4:
Bootstrap 4 has some nice helper classes for width like w-25
, w-50
, w-75
, w-100
, and w-auto
. This will make the table 50% width:
<table class="w-50"></table>
Here's the doc: https://getbootstrap.com/docs/4.0/utilities/sizing/