我正在使用Twitter Bootstrap。在表单中,我可以进行水平布局和垂直布局,但类在<form>
标签上。那么,如何在我想节省空间的地方做一点点,然后水平放置几个输入框,其余的垂直放置?
我有一个看起来像这样的表格:
Address [__________________]
City [___________]
State [__]
Zip [_____]
Country [____]
但我希望它看起来像这样:
Address [__________________]
City [___________]
State [__] Zip [_____] Country [____]
请帮助CSS。
这是我的代码:
<form class="form-horizontal">
<fieldset>
<div class="row-fluid">
<div class="span6">
<div class="control-group">
<label class="control-label" for="Address">Mailing Address</label>
<div class="controls">
<input data-val="true" data-val-required="Required" id="mailing" name="Address" type="text" value="1313 Mockingbird Lane" class="valid">
</div>
</div>
<div class="control-group">
<label class="control-label" for="City">City</label>
<div class="controls">
<input class="span3 valid" id="city" name="City" type="text" value="Kaysville">
</div>
</div>
<div class="control-group">
<label class="control-label" for="State">State</label>
<div class="controls">
<input class="span2" id="state" name="State" type="text" value="UT">
</div>
</div>
<div class="control-group">
<label class="control-label" for="PostalCode">Zip</label>
<div class="controls">
<input class="span2" id="postalCode" name="PostalCode" type="text" value="12345">
</div>
</div>
<div class="control-group">
<label class="control-label" for="Country">Country</label>
<div class="controls">
<input class="span3" id="country" name="Country" type="text" value="US">
</div>
</div>
</div>
</div>
</fieldset>
</form>