html - 将 2 个输入字段与下拉 Bootstrap 对齐

标签 html css twitter-bootstrap twitter-bootstrap-3

这就是我现在所拥有的,我尝试了多种方法,包括 from 但没有一个对我有用。

我有: enter image description here

我想要的: enter image description here

我的代码:

<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
<fieldset class="inline-fields">
    <div class = "row col-sm-12">
        <div class = "row col-sm-6 col-md-6">
        	<div class="dropdown">
				<button class="btn btn-default btn-lg dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">Designer
				<span class="glyphicon glyphicon-triangle-bottom"></span></button>
				<ul class="dropdown-menu scrollable-menu" role="menu">
					<li><a href="#">Action</a></li>
					<li><a href="#">Another action</a></li>
					<li><a href="#">Something else here</a></li>
					<li><a href="#">Action</a></li>
					<li><a href="#">Action</a></li>
					<li><a href="#">Another action</a></li>
        		</ul>
			</div>
        </div>
        <div class = "row col-sm-6 col-md-6">
			<input type="text" class="form-control form_after input-lg" id="form1" placeholder="email"/>
			<input type="text" class="form-control form_after input-lg" id="form2" placeholder="referal"/>
            <br/>
        </div>
    </div>
</fieldset>

谢谢。

最佳答案

添加display: inline-block;给你的<div class="dropdown">和 2 个输入元素

关于html - 将 2 个输入字段与下拉 Bootstrap 对齐,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38787092/

相关文章:

javascript - Jquery 循环在 Bootstrap 模式中运行两次

html - 使 SVG 适合父容器宽度

css - 在 React 中将 css 显示 block 更改为无

CSS:解决 Chrome 中背面可见性错误的方法

css - 在 Firefox 的零高度元素中隐藏伪类内容

jquery - 打开模态后 Bootstrap 主体自动填充删除

java - 在未包含在标签中的多行文本节点中用 <br> 标签替换换行符

html - 响应式固定滑动滑杆

html - css div 背景图像 url 将颜色更改为淡蓝色在 IE11 中不起作用

jquery - bootstrap typeahead 返回名称和 id