如何使用Twitter Bootstrap获得2600px和25列宽的整洁表?

mar*_*ion 1 twitter-bootstrap

我有一个有25列的表,总共宽约2600px.

现在,我有如下所述的结构 - 但它正在该content区域之外流动,并且每列中的内容未正确对齐.实际上,应该在一行上的内容在每行中出现在2或3上.它通常看起来不整洁.

我怀疑这是因为Twitter Bootstrap是为较小的数据集 - 特别是表格而制作的.

但有没有人对我如何让这张桌子看起来不笨重有任何想法?

<div class="container-fluid">
        <div class="content">
           <div class="row-fluid">
            <div class="span12">

              <h2>Home</h2>

<table class="table table-striped table-hover table-condensed">
  <thead>
    <tr>
      <th>Name</th>
      <th>Phone</th>
      <th>Email</th>
      <th>Co. Name</th>
      <th>Co. Phone</th>
      <th>Co. Size</th>    
      <th>Co. Type</th>    
      <th>City</th>
      .
      .
      .    
    </tr>
  </thead>  

  <tr>
    <td>John F Kennedy</td>
    <td>87698765</td>
    <td>jfk@email.com</td>
     <!-- Begin Firm Info Here -->
        <td>Acme Inc</td>
        <td>(876) 987-6543</td>
       .
       .
       .
    </tr>
   </table>

      </div>
    </div>
  </div>
</div>
Run Code Online (Sandbox Code Playgroud)

谢谢!

alb*_*igo 8

为避免换行,您可以使用

.the-table {
    white-space: nowrap;
    max-width: none;
    width: auto;
}
Run Code Online (Sandbox Code Playgroud)

这将强制在容器上<table>(或在浏览器中,如果该容器可以展开)进行水平滚动.所以,如果你想控制它的布局,你可以把<table>里面放一个<div>with overflow: auto和一个set width.您可以使用带有额外类的Bootstrap"span":

.the-container {
    overflow: auto;
    /* width cames from spanN class */
}
Run Code Online (Sandbox Code Playgroud)