2015-03-31 26 views
0

當我把這個按鈕放在一個表單中時,它開始一個新行,但我希望它內聯。我嘗試添加class =「form-inline」,但它不起作用。我一定在網上搜索不好,因爲我自己找不到正確的答案。如何保持引導表單按鈕內聯

引導約定是什麼保持內聯?

<div class="col-sm-12"> 
<table> 
    <thead> 
     <tr> 
      <th>Edit</th> 
     </tr> 
    </thead> 
    <tbody> 
     <tr> 
      <td> 
       <a class="inline btn btn-info btn-xs glyphicon glyphicon-pencil"></a> 
       <button class="form-inline glyphicon glyphicon-trash btn btn-xs btn-danger del" type="button"></button>     
      </td> 
     </tr> 
    </tbody> 
</table> 

Fiddle

回答

1

只需改變你的標記一點:

this demo

<td> 
    <form class="form-inline" method="POST"> 
     <a class="btn btn-info btn-xs glyphicon glyphicon-pencil"></a> 
     <button class="glyphicon glyphicon-trash btn btn-xs btn-danger del" type="button"></button> 
    </form> 
</td> 
+0

哦!現在我明白了這是如何工作的,謝謝! – Phil 2015-03-31 17:37:15

+0

很高興幫助:) – Ted 2015-03-31 17:37:33