我想创建一个如下所示的输入框组:
title1
name: (input text box)
link: (input text box)
remove this title
title2
name: (input text box)
link: (input text box)
remove this title
我的CSS是
<div class="control-group">
<label class="control-label"><h3>title1</h3></label>
<label for="inputError" class="control-label">name</label>
<div class="controls">
<input class="field span6" type="text" id="newsLinkTxt_1" />
</div>
</br>
<label for="inputError" class="control-label">link</label>
<div class="controls">
<input class="field span6" type="text" id="newsLink_1" />
</div>
</br>
<button class="btn" id="removeButton" type="button">remove this</button>
</div>
问题是控制标签类的边距为 20 ,因此输入框的左边距为 20 。但是 title1 和按钮将向左对齐,我应该为 button 和 control-group 中的标题使用什么类,或者我需要自定义 css?谢谢
最佳答案
我会查看 .form-group 或 .input-group 部分
关于html - 如何使用 Bootstrap 创建输入组?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19118460/