2013-10-01 71 views
0

我想创建一个输入框组类似如下:如何使用bootstrap创建输入组?

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和按钮将左对齐,我应该使用哪个类按钮和控件组中的标题,或者我需要定制css?由于

+0

你可以做一个jsfiddle吗? – poodle

回答

0

你能不能使用.FORM组类,然后再修改任何其他调整

+0

这不提供问题的答案。要批评或要求作者澄清,请在其帖子下方留言。 – EdChum

+0

但上面的答案可以吗?它被接受并投票表决,并说相同 –

+0

它提供的链接是微妙的不同,你的答案是不直接回答问题的问题,只是问为什么他们没有尝试一种特定的方法。即使答案不合格(在这种情况下,链接只有答案被忽视),OP可以自由地接受答案并接受答案,但我会对上述答案发表评论。希望能够澄清一些事情 – EdChum

相关问题