2014-10-09 46 views
1

右邊的下拉列表位於表格單元格中,這可以在桌面瀏覽器上按預期工作。Bootstrap 2.3.2表格中的拆分按鈕下拉線

enter image description here

但是在移動,上點擊,下拉被分成兩行:

enter image description here

HTML

<table class="table table-striped table-bordered table-hover"> 
<tr> 
<td> ... </td> 
<td> ... </td> 
<td> ... </td> 
<td> 
    <div class="btn-group"> 
     <a href="#" class="btn btn-primary btn-small"><i class="icon-eye-open icon-white"></i> Visualizza</a> 
     <button class="btn dropdown-toggle btn-primary btn-small" data-toggle="dropdown"><span class="caret"></span></button> 
     <ul class="dropdown-menu"> 
      <li><a href="#"><i class="icon-pencil"></i> Modifica</a></li> 
      <li><a class="btn-confirm" href="#"><i class="icon-trash"></i> Elimina</a></li> 
     </ul> 
    </div> 
</td> 
</tr> 
</table> 

回答

1

問題最有可能從表格單元格莖對於兩個元素來說,寬度佈局太短。

最簡單的解決方案是設置爲該單元格添加一個類並添加最小寬度,儘管您將遠離純引導程序。

HTML:

<td> ... </td> 
<td class="dropdownCell"> 
    <div class="btn-group"> 
    ... 

的CSS:

.dropdownCell { min-width:130px; } 

小提琴是在這裏:http://jsfiddle.net/a4kx75t1/1/

相關問題