在右侧面板Twitter Bootstrap中对齐horinzontal组件

时间:2015-09-21 13:33:56

标签: html css twitter-bootstrap

我尝试在拉右面板中对齐水平组件,但它保持垂直对齐。

跟着我做:

        <div class="pull-right">

              <select class="form-control" id="month" onChange="selectMonth()">
                 <option value="01">
                    Mês
                 </option>
                 <option value="01">
                    Janeiro
                 </option>
                 <option value="02">
                    Fevereiro
                 </option>
                 <option value="03">
                    Março
                 </option>
                 <option value="04">
                    Abril
                 </option>
              </select>

              <select class="form-control" id="day" onChange="selectDay()">
                 <option value="01">
                    Dia
                 </option>
                 <option value="02">
                    01
                 </option>
                 <option value="03">
                    07
                 </option>
                 <option value="04">
                    14
                 </option>
              </select>

        </div>

https://jsfiddle.net/lbclucascosta/e30toqa1/2/

这是由form-control引起的,但我尝试做的事情都不起作用。我想离开月份选择和日期并排选择。我该怎么做?

感谢。

1 个答案:

答案 0 :(得分:3)

将班级form-inline添加到您的div

更新小提琴:https://jsfiddle.net/e30toqa1/3/

<div class="pull-right form-inline"></div>

和引导参考:http://getbootstrap.com/css/#forms-inline