2014-02-21 144 views
0

我想要这个按钮水平对齐,我使用bootstrap.min.js v3.0.0,bootstrap.min.css,application.css。引导按钮

<div class="row"> 
<div class="col-lg-4 col-md-3 col-sm-4 col-xs-6 form-group"> 
    <label>Fecha desde</label> 
    <div class="input-group date datepicker" > 
     <input class="form-control col-md-12" type="text"> 
     <span class="input-group-addon"><i class="fa fa-calendar"></i></span> 
    </div> 
</div> 
<div class="col-lg-4 col-md-3 col-sm-4 col-xs-6 form-group"> 

    <label>Fecha cierre</label> 
    <div class="input-group date datepicker"> 
     <input class="col-md-12 form-control" type="text" /> 
     <span class="input-group-addon"><i class="fa fa-calendar"></i></span> 
    </div> 
</div> 
<div class="col-lg-4 col-md-6 col-sm-4 col-xs-12"> 
    <input type="button" class="btn btn-success" style="alignment-adjust:central;" value="Buscar" onclick="cargarLista();"/> 
</div> 

我:enter image description here

我想:enter image description here

我真的很感激任何帮助,您可以提供!

+0

更多的信息在这里很有用。你在这里“衬里”按钮是什么?代码示例,也许是一个jsfiddle,所以我们实际上可以在这里有一些代码 – Mutmatt

回答

1

引导仅仅是一个框架,可以帮助您入门,有时间,您需要添加或重写它的基本代码。

这是其中之一。

如何进行:

  • 你包裹按钮<div>添加一个类是DIV叫align-bottom
  • 然后,建立在同一个地方叫application.css(如果你没有的话还没有)的文件作为你的CSS文件,并记得地方<link>引导之下调用

例如:

<link href="/assets/css/bootstrap.min.css" rel="stylesheet" /> 
<link href="/assets/css/application.css" rel="stylesheet" /> 

application.css里面写的样式:

.controls.align-bottom { 
    line-height: 90px; 
} 

请注意,您可能需要昌为了使其正确无误,请上下调整90px

演示在JsBin:http://jsbin.com/vajut/2/edit?html,css,output


这是途径之一......还有其他的,CSS是一个非常大的和可爱的东西!

+0

这工作得很好,谢谢! –

0

看起来像您在文本输入中使用了<legend>。 容易解决将是补充:

<legend>&nbsp;</legend> 

为了您的按钮输入

+0

我已经试过,没有工作,请试用