2
我對對齊場無標籤如何正確引導形式
<form action="#" method="post" class="well">
<fieldset>
<div class="control-group">
<label class="control-label" for="FirstName">Name</label>
<div class="controls row-fluid">
<div class="span2 row">
<input class="span12" id="FirstName" name="FirstName" placeholder="Firstname" type="text" value=""/>
</div>
<div class="span2 row">
<input class="span12" id="MiddleName" name="MiddleName" placeholder="Middlename" type="text" value=""/>
</div>
<div class="span2 row">
<input class="span12" id="LastName" name="LastName" placeholder="Lastname" type="text" value=""/>
</div>
</div>
</div>
</fieldset>
</form>
的jsfiddle:http://jsfiddle.net/bWGfb/
我要添加標籤爲姓,所以我想有一標籤,姓只。引導程序如何可能?
UPDATE: 我可以做這樣的事情:
<div class="row-fluid">
<div class="span12">
<div class="span4">
<label>First Name</label>
<input type="text" class="span12" placeholder="First Name">
</div>
<div class="span4" style="margin-top: 25px;">
// field without label
<input type="text" class="span12" placeholder="Last Name">
</div>
<div class="span4 ">
<label>First Name</label>
<input type="text" class="span12" placeholder="Last Name">
</div>
</div>
</div>
,但它增加了額外的保證金風格。
沒錯,但是如何去除中間名的標籤並保存正確的內聯對齊? – johnny
可能有點不好意思,但是''label for =「MiddleName」> '會做:P –