选择内联到底部

时间:2014-04-18 20:06:32

标签: html css css3

enter image description here

我无法将所有元素推到底部

<div class="row">

    <div class="col-sm-4">
      <%=p.select :accounts_receivables_items_type_id, options_from_collection_for_select(AccountsReceivablesItemsType.all, :id, :title, p.object.accounts_receivables_items_type_id), {}, class: "form-control chosen-select"%>
    </div>
    <div class="col-sm-2">
      <%=p.input_field :total_less_tax, class: "form-control input-sm mb15", placeholder: "Netto"%>
    </div>
    <div class="col-sm-3">

        <button type="button" class="btn btn-danger"><span class="glyphicon glyphicon-remove"></span> Rimuovi voce</button>

    </div>


</div> 

GENERATED

<div class="form-group">



                  <label class="string optional control-label col-sm-3 control-label" for="accounts_receivable_accounts_receivables_items">Voci fattura</label>
                  <div class="col-sm-9">

                    <div id="invoice_products">


                    <div class="fields">
                        <div class="row">

                            <div class="col-sm-4">
                              <select class="form-control " id="accounts_receivable_accounts_receivables_items_attributes_1397853396301_accounts_receivables_items_type_id" name="accounts_receivable[accounts_receivables_items_attributes][1397853396301][accounts_receivables_items_type_id]"><option value="126">Vendita Auto Usata</option>
<option value="127">Pubblicità</option>
<option value="128">Contratto Gestione</option>
<option value="129">Corsa esente IVA</option>
<option value="130">Corsa con IVA</option></select>
                            </div>

                            <div class="col-sm-2">
                              <input class="numeric decimal required form-control" id="accounts_receivable_accounts_receivables_items_attributes_1397853396301_total_less_tax" min="0" name="accounts_receivable[accounts_receivables_items_attributes][1397853396301][total_less_tax]" placeholder="Netto" step="any" type="number" value="0.0">
                            </div>

                            <div class="col-sm-3">
                              <input id="accounts_receivable_accounts_receivables_items_attributes_1397853396301__destroy" name="accounts_receivable[accounts_receivables_items_attributes][1397853396301][_destroy]" type="hidden" value="false"><a class="remove_nested_fields" data-association="accounts_receivables_items" href="javascript:void(0)">
                                <button type="button" class="btn btn-danger"><span class="glyphicon glyphicon-remove"></span> Rimuovi voce</button>
</a>                            </div>


                        </div> 
</div></div>
                    <a class="add_nested_fields" data-association="accounts_receivables_items" data-blueprint-id="accounts_receivables_items_fields_blueprint" data-target="#invoice_products" href="javascript:void(0)">
                      <button type="button" class="btn btn-success"><span class="glyphicon glyphicon-plus"></span> Aggiungi un altra voce</button>
</a>
                  </div>



              </div>

1 个答案:

答案 0 :(得分:0)

如果浮动元素你可以使用display:flex,这会破坏任何引导网格的东西吗? http://fiddle.jshell.net/TNyUa/3/show/

.col-sm-9, .form-group {
  display: flex;
}
.form-group > label, .col-sm-9 > div {
  align-self: flex-end;
}