twitter-bootstrap – 更改列宽引导表

我有一个静态 PHP站点我正在使用Bootstrap.这些表由Bootstrap控制.

我注意到,我似乎无法控制TD部分的长度,以防止电话号码等包装.正如你所看到的,结尾有很多空间,只是不知道如何传播这个空间.

我尝试了< th>上的内联宽度但没有发生什么:

<table class="table table-condensed table-striped  table-hover">
  <thead>
    <tr>
        <th>#</th>
        <th width="12%">Last Name</th>
        <th width="12%">First Name</th>
        <th width="12%">Spouse's Name</th>
        <th width="20%">Address</th>
        <th width="5%">City</th>
        <th  width="12%"class="did_phone">Phone</th>
        <th width="15%">E-Mail</th>
         <th width="15%"></th>
    </tr>
  </thead>
  <tbody>

屏幕如下所示,您可以看到:
https://docs.google.com/file/d/0B9AH3_9hXYkhQzJBclp3bU9iUU0/edit?usp=drivesdk

所以…如何更改< td>宽度,进行调整,所以没有包装,在Bootstrap?

解决方法

Bootstrap使表100%.所以表th设置为100%.解决方案是使其自动化.所以我只是通过将以下内容添加到我的css中来覆盖Bootstrap:
table th {
    width: auto !important;
}

所有的东西都排成一排.

相关文章

Bootstrip HTML 查询搜索常用格式模版 &lt;form class=&...
如何在按钮上加红色数字 您可以使用Bootstrap的badge组件来在...
要让两个按钮左右排列,你可以使用 Bootstrap 的网格系统将它...
是的,可以将status设置为布尔类型,这样可以在前端使用复选...
前端工程师一般用的是Bootstrap的框架而不是样式,样式一般自...
起步导入:<linkrel="stylesheet"href="b...