我在设置使用Bootstrap 2.3.2的表单控件时遇到以下问题
我在面板中有两行。每行分为两个跨度。每个跨度都有一个表格。 显然,这些行彼此半相似,但它们没有对齐。 有没有办法将它们与覆盖引导程序的整体风格对齐?
<div class="container-fluid">
<div class="panel panel-info">
<div class="panel-heading">
Summary Report
</div>
<div class="row-fluid">
<div class="span4">
<div class="form-inline">
<label>Weekly Total</label>
<input type="text" value="22MM" />
</div>
</div>
<div class="span8">
<div class="form-inline">
<label>Days' Total</label>
<input type="text" value="111" class="input-mini" />
<input type="text" value="111" class="input-mini" />
<input type="text" value="111" class="input-mini" />
<input type="text" value="111" class="input-mini" />
<input type="text" value="111" class="input-mini" />
<input type="text" value="111" class="input-mini" />
<input type="text" value="111" class="input-mini" />
</div>
</div>
</div>
<div class="row-fluid top-buffer">
<div class="span4">
<div class="form-inline">
<label>Monthly Per Total</label>
<input type="text" value="33MM" />
</div>
</div>
<div class="span8">
<div class="form-inline text-center">
<label>Monthly Total</label>
<input type="text" value="111" class="input-mini" />
<input type="text" value="111" class="input-mini" />
<input type="text" value="111" class="input-mini" />
<input type="text" value="111" class="input-mini" />
<input type="text" value="111" class="input-mini" />
<input type="text" value="111" class="input-mini" />
<input type="text" value="111" class="input-mini" />
</div>
</div>
</div>
</div>
</div>
这是我到目前为止所得到的快照:
答案 0 :(得分:0)
我只是将标签和输入与spanX类隔开,并根据需要对齐标签(文本左侧,文本右侧等),以便将其应用于原始代码:
<div class="container-fluid">
<div class="panel panel-info">
<div class="panel-heading">
Summary Report
</div>
<div class="row-fluid">
<div class="span4">
<div class="form-inline">
<label class="span4 text-right">Weekly Total</label>
<input class="span8" type="text" value="22MM" />
</div>
</div>
<div class="span8">
<div class="form-inline">
<label class="span4 text-right">Days' Total</label>
<input type="text" value="111" class="input-mini span1" />
<input type="text" value="111" class="input-mini span1" />
<input type="text" value="111" class="input-mini span1" />
<input type="text" value="111" class="input-mini span1" />
<input type="text" value="111" class="input-mini span1" />
<input type="text" value="111" class="input-mini span1" />
<input type="text" value="111" class="input-mini span1" />
</div>
</div>
</div>
<div class="row-fluid top-buffer">
<div class="span4">
<div class="form-inline">
<label class="span4 text-right">Monthly Per Total</label>
<input class="span8" type="text" value="33MM" />
</div>
</div>
<div class="span8">
<div class="form-inline ">
<label class="span4 text-right">Monthly Total</label>
<input type="text" value="111" class="input-mini span1" />
<input type="text" value="111" class="input-mini span1" />
<input type="text" value="111" class="input-mini span1" />
<input type="text" value="111" class="input-mini span1" />
<input type="text" value="111" class="input-mini span1" />
<input type="text" value="111" class="input-mini span1" />
<input type="text" value="111" class="input-mini span1" />
</div>
</div>
</div>
</div>
</div>