Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/33.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
Css 引导模式:模式页脚中左右对齐的内容_Css_Twitter Bootstrap_Twitter Bootstrap 3 - Fatal编程技术网

Css 引导模式:模式页脚中左右对齐的内容

Css 引导模式:模式页脚中左右对齐的内容,css,twitter-bootstrap,twitter-bootstrap-3,Css,Twitter Bootstrap,Twitter Bootstrap 3,我有这样的想法: 我有一些按钮在右边,文本在左边。我想让它们垂直对齐。如果你把尺子放在文本下面,文本应该在同一行上。我似乎做不到这一点 有什么想法吗 <div class="modal-footer" style="margin-top:0;"> <div style="float:left;color:#737373;font-style:italic"><strong>test:</strong> - <a href="#"&g

我有这样的想法:

我有一些按钮在右边,文本在左边。我想让它们垂直对齐。如果你把尺子放在文本下面,文本应该在同一行上。我似乎做不到这一点

有什么想法吗

<div class="modal-footer" style="margin-top:0;">
    <div style="float:left;color:#737373;font-style:italic"><strong>test:</strong> - <a href="#">advanced</a></div>
    <div style="float:right">
          <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
          <button type="button" class="btn btn-primary" data-loading-text="Submitting...">Send Message</button>
    </div>
</div>

测试:-
取消
发送消息

只需将所讨论的
div
的行高与按钮高度相同即可

在您的情况下,它将是
行高:34px


您只需在
span
中添加文本,并应用两个本机引导类:
表单控件static
用于将文本与按钮垂直对齐,以及
向左拉
用于将页脚中的文本左对齐

不需要额外的浮动div,按钮已经由
模式页脚
类右对齐。您甚至可以调整文本和按钮,例如,分别将
input lg
btn lg
类应用于span和按钮:


启动演示模式
&时代;
情态标题
...
垂直对齐文本示例
接近
保存更改