問題:
I am building a form in Twitter Bootstrap but I'm having issues with centering the button below the input in the form. 我正在Twitter Bootstrap中構建一個表單,但是我遇到了將表單中輸入下方的按鈕居中的問題。 I have already tried applying the center-block
class to the button but that didn't work. 我已經嘗試將center-block
類應用於按鈕,但這不起作用。 How should I fix this? 我該怎麼解決這個問題?
Here is my code. 這是我的代碼。
<!-- Button -->
<div class="form-group">
<label class="col-md-4 control-label" for="singlebutton"></label>
<div class="col-md-4">
<button id="singlebutton" name="singlebutton" class="btn btn-primary center-block">
Next Step!
</button>
</div>
</div>
解決方案:
參考一: https://stackoom.com/question/1Wjn3參考二: How to center buttons in Twitter Bootstrap 3?