最佳答案
像下面的回答状态一样,您已经为 Fieldset 3 提供了 col-md-6
类以及您的 form-group
。现在,由于您确实需要 col-md-6
将元素分成 2 列,您可以针对特定的字段集并删除填充。
HTML:
<form class="form-horizontal" id="fieldset3"> <!-- ID added -->
<fieldset>
<legend>Fieldset 3</legend>
CSS:
#fieldset3 .col-md-6{
padding-left:0px;
}
为了方便起见,您还可以这样对标签进行分组:
<div class="col-md-6">
<div class="form-group">
<!-- Label and input here -->
</div>
<div class="form-group">
<!-- Label and input here -->
</div>
<div class="form-group">
<!-- Label and input here -->
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<!-- Label and input here -->
</div>
<div class="form-group">
<!-- Label and input here -->
</div>
<div class="form-group">
<!-- Label and input here -->
</div>
</div>
关于css - 填充问题 - bootstrap 3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24227601/