使用twitter bootstrap对齐ancor表单

问题描述:

我正在使用twitter引导程序,并且我有一个带有链接的窗体,该窗体应该打开带有输入的弹出窗口。 由于某些原因,链接不是垂直对齐的。我想知道在表单中做什么是“自举”方式。这里的jsfiddle:http://jsfiddle.net/3j7QP/4/
下面是HTML:使用twitter bootstrap对齐ancor表单

<form class="form-horizontal" id="postForm"> 
    <fieldset> 
     <div class="control-group"> 
      <label class="control-label" for="start_location">Origin</label> 
      <div class="controls"> 
       <a id="start_location" name="start_location" href="javascript:;">open select tooltip</a> 
      </div>    
     </div> 
    </fieldset> 
</form> 

正如你可以在这个jsfiddle demo看,你应该使用.help-inline类(或.help-block根据您的需求),但是,即使是类,你将需要调整的东西,如果你没有任何投入。

<div class="controls noinput"> 
    <span class="help-inline"><!-- <a> --></span> 
</div> 
.controls.noinput > .help-inline { line-height: 28px; } 

28px值可以根据你的引导变量而变化。它基本上等于control-group高度。