Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/fsharp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Twitter bootstrap 在引导对话框中对齐表单元素_Twitter Bootstrap - Fatal编程技术网

Twitter bootstrap 在引导对话框中对齐表单元素

Twitter bootstrap 在引导对话框中对齐表单元素,twitter-bootstrap,Twitter Bootstrap,我在这里创建了一个问题演示: 这里的表单要求输入电子邮件和密码,下面是“记住我”复选框和“忘记密码”链接(按钮) 这是我的问题-复选框下方的“忘记密码”链接是。它希望它与复选框位于同一行,并且右对齐 我已经用这个敲了一段时间,我似乎无法得到“忘记密码”链接在我需要的地方。有什么建议吗 <div class="controls controls-row"> <label class="checkbox span4"><input type="checkbox" i

我在这里创建了一个问题演示:

这里的表单要求输入电子邮件和密码,下面是“记住我”复选框和“忘记密码”链接(按钮)

这是我的问题-复选框下方的“忘记密码”链接是。它希望它与复选框位于同一行,并且右对齐

我已经用这个敲了一段时间,我似乎无法得到“忘记密码”链接在我需要的地方。有什么建议吗

<div class="controls controls-row">
  <label class="checkbox span4"><input type="checkbox" id="inlineCheckbox1" value="option1"> Remember me for 2 weeks</label>
  <button type="button" class="btn-link span2">Forgot Password?</button>
</div>

记住我两周
忘记密码了?

您可以将按钮放在“复选框”标签内,然后在控件组上使用“向右拉”,如下所示

<div class="control-group pull-right">
 <div class="controls controls-row">
    <label class="checkbox"> <input type="checkbox" id="inlineCheckbox1" value="option1"> Remember me for 2 weeks  <button type="button" class="btn-link">Forgot Password?</button></label>
 </div>                                 
</div>

记得我忘记密码两周吗?

啊,谢谢你。事实上,我修改了您的代码,将拉右键移动到“忘记密码”链接,这样它们都会在应该的位置对齐。但这基本上就是答案,把它们都放在标签上

<div class="control-group">
    <div class="controls controls-row">
        <label class="checkbox"> <input type="checkbox" id="inlineCheckbox1" value="option1"> Remember me for 2 weeks  <button type="button" class="btn-link pull-right">Forgot Password?</button></label>
    </div>  
</div>  

记得我忘记密码两周吗?