如何更改Bootstrap Datatable头列宽度
问题描述:
我想更改Bootstrap DataTable头列宽度。 我试过多个解决方案,它不工作。如何更改Bootstrap Datatable头列宽度
<div class="frame" style="height: 750px; overflow: auto; padding: 7px 20px 20px 20px; ">
<table id="example" class="table table-striped table-bordered" cellspacing="0" width="100%">
<thead>
\t <tr>
\t \t <th>First Name</th>
\t \t <th> Last Name</th>
\t \t <th>Organization Name</th>
\t \t <th>Address</th>
\t \t <th>Country</th>
\t </tr>
</thead>
\t <tbody>
\t </tbody>
</table>
</div>
我试图改变第二列的宽度一样,但力工作
<th style="width: 60px"> Last Name</th>
如何更改特定列的宽度。 请帮忙
答
初始化数据表时,将数据表的“bAutoWidth”属性设置为false,并按照上面的方式设置列的宽度。