2015-06-11 36 views
0

我只是想簡單地對齊一些文本和跨度。所以我製作了一張桌子,認爲我可以以某種方式告訴代碼不要畫任何線條。如何使用引導創建無邊界表

這裏是我的示例表:

 <table class="table"> 
      <tbody id="checkbox_list"> 
     <tr style='border:none' > 
      <td style='border:none' > Something <td> 
      <td style='border:none' > <span class="label label-default" style="background-color:#000000;width:35px;height:20px;display:inline-block;"><td> 
     </tr> 
     <tr style='border:none' > 
      <td style='border:none' > Something <td> 
      <td style='border:none' > <span class="label label-default" style="background-color:#000000;width:35px;height:20px;display:inline-block;"><td> 
     </tr>   
      </tbody> 
     </table> 

這就是它顯示我

enter image description here

反正我可以擺脫那些討厭的行除了黑盒子?

+2

沒有'td'在上面的HTML – Tushar

+2

關閉你就不能使用'borderless'類''

元素?而且你還需要關閉你的'​​'。 – Peter

+0

事情是這個問題。謝謝!!! – aarelovich

回答

0

正確關閉TD。使用下面的CSS來解決你的問題。

.table tr, .table td { 
    border: none; 
} 
0

Bootstrap在表格中添加了一些邊框。添加到您的自定義CSS:

CSS

.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th { 
    border: none; 
} 

DEMO HERE

這個CSS必須percede引導CSS

0

試試這個:

.table > tbody > tr > td{ 
    border: none; 
} 

Demo

0

嘗試這樣的:Demo

.table.no-border tr td, .table.no-border tr th { 
    border-width: 0; 
} 

HTML:

<table class="table no-border"> 
      <tbody id="checkbox_list"> 
     <tr> 
      <td> ... <td> 
      <td > ... <td> 
     </tr> 
     <tr> 
      <td > .. <td> 
      <td > .. <td> 
     </tr>   
      </tbody> 
     </table>