0

我想创建一个输入框组,如下所示:

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>

问题是 control-label 类的边距为 20 ,因此输入框的左边距为 20 。但是 title1 和 button 将向左对齐,我应该为 button 和 control-group 中的标题使用什么类,或者我需要自定义 css?谢谢

4

2 回答 2

2

我会查看 .form-group 或 .input-group 部分

http://getbootstrap.com/css/#forms

http://getbootstrap.com/components/#input-groups

于 2013-10-01T14:18:15.470 回答
0

你能不使用 .form-group 类然后进一步修改任何其他调整吗

于 2013-10-01T14:17:47.487 回答