2014-07-25 28 views
0

我有以下数据表从ajax获取数据,但我还没有找到使其宽度为50%的选项,有没有办法做到这一点?带有50%宽度的JQuery Datatable

    <div id="masonry" class="yesPrint"> 
         <table class="table table-nonfluid table-condensed table-striped table-bordered table-hover" id="sample_2"> 
          <thead> 
          <tr> 
           <th class="centralize" colspan="2">1 - Ramais</th> 
          </tr> 
          <tr align="left"> 
           <th>Número</th> 
           <th>Nome</th> 
          </tr> 
          </thead> 
          <tbody> 
          </tbody> 
         </table> 
         </div> 

回答

0

除非我失去了一些东西......

你想使用一个CSS样式:width: 50%;

0

这里有一个小提琴:http://jsfiddle.net/6KzXw/3/

尝试在一个容器中,并设置它包装宽度:容器上的50%,如果不能直接放在桌子上。像这样:

#masonry { width: 50%; }