问题:
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?