html - 将搜索表单拉到井内的右侧

标签 html css twitter-bootstrap-3

我正在尝试让搜索表单在井内向右拉。它向右拉,但向井的南边移动。

我的代码是;

<div class="container">
<div class="well">

    <div class="pull-right">
<form class="form-inline " role="form">
    <input type="search" class="form-control" id="search" placeholder="Search Assets">
    <button type="submit" class="btn btn-default">Search</button>
</form>

</div>

我在 http://jsfiddle.net/52VtD/3366/ 做了一个 jsfiddle

最佳答案

您需要在 float div 之后清除 float 。

Here

<div class="container">
    <div class="well">
        <div class="pull-right">
            <form class="form-inline " role="form">
                <input type="search" class="form-control" id="search" placeholder="Search Assets">
                <button type="submit" class="btn btn-default">Search</button>
            </form>
        </div>

        <div class="clearfix"></div>
</div>
</div>

关于html - 将搜索表单拉到井内的右侧,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22235937/

相关文章:

html - CSS:向左移动按钮

html - 为什么在父级大小不变的情况下向 div 添加内容会向页面添加滚动条?

javascript - 如何将附加元素保留在父元素中?

css - 文本超出包含 div

css - Bootstrap 静态弹出窗口

C# MVC 核心自定义 Bootstrap CSS

css - 使用 html 的便签

JavaScript 创建和删除 "li"标签

jquery - 我如何使用 jquery 更改行的颜色?根据条件

javascript - 使用 JS、表单显示/隐藏弹出窗口