twitter bootstrap span没有正确对齐

时间:2013-04-20 05:50:44

标签: css twitter-bootstrap

出于某种原因,当我应用跨度时,跨度不会将自身对齐到合适的网格中。我应用跨度的元素类型似乎并不重要,在这种情况下它是输入。我显然希望他们自己调整,我做错了什么?

在这里小提琴:http://jsfiddle.net/fKQsj/

   <div class="row-fluid">
                <div class="span12">
                    <input type="text" class="span4" placeholder="First" />
                    <input type="text" class="span4" placeholder="Middle" />
                    <input type="text" class="span4" placeholder="Last" />
                </div>
            </div>
            <div class="row-fluid">
                <div class="span12">
                    <input type="text" class="span4" placeholder="City" />
                    <input type="text" class="span2" placeholder="State" />
                    <input type="text" class="span2" placeholder="Zip5" />
                    <input type="text" class="span4" placeholder="Store" />
                </div>
            </div>
            <div class="row-fluid">
                <div class="span12">
                    <div class="span4 offset8">
                        <button class="btn btn-success pull-right">Search</button>
                    </div>
                </div>
            </div>

1 个答案:

答案 0 :(得分:1)

取自手册

For multiple grid inputs per line, use the .controls-row modifier class for proper spacing. 
It floats the inputs to collapse white-space, sets the proper margins, and clears the float.