Joseph Goh Joseph Goh - 1 year ago 91
CSS Question

Bootstrap table custom width on each column

How to set the width of bootstrap table?

I tried to use

, it does not effect the width. The table class seems to have its width equal to display width.

In my case, i have a lot of information to be displayed through the table which is will exceeded the width of the display, hence i need to have the horizontal scrollbar.

This is the last code i have tried.

<table class="table">
<th class="col-md-1">Action</th>
<th class="col-md-2">Description</th>
<tr ng-repeat="x in Tablelist track by $index">
<div class="btn-group">
<button class="btn btn-primary btn-xs" ng-click="Opensetprice(,x.matcode,x.pr_qty)">$</button>
<button class="btn btn-danger btn-xs" ng-click="Delete(x.doc_no,x.item_no, $index)">X</button>

tried to override the class
width with
, does not do any help.


Give your table parent overflow: auto;