【发布时间】:2018-05-19 23:10:32
【问题描述】:
我在每个输入上都有一个带有长标签的表单,我希望输入在每个标签下方居中,但我还需要输入保持内联。它应该如下所示,但输入应该在每个长标签下居中。
这是我所拥有的,但我无法在标签下设置输入中心。
.question-container {
width: 1000px;
margin: 0 auto;
}
#questions {
margin: 5px 30px;
display: inline-block
}
<div class="form-inline">
<span id="questions">
<label>How much will your house cost?</label>
<input class="form-control" type="text" placeholder="input">
</span>
<span id="questions">
<label>What is the most you can pay monthly?</label>
<input class="form-control" type="text" placeholder="input">
</span>
<span id="questions">
<label>What is your Current Monthly Rent?</label>
<input class="form-control" type="text" placeholder="input">
</span>
</div>
<div id='centered'>
<button type="submit" class="btn btn-primary mb-2">Submit</button>
</div>
任何帮助将不胜感激!
【问题讨论】:
-
Bootstrap 4 没有
col-xs类,它被重命名为col。
标签: html css bootstrap-4