Html 以引导形式将文本置于标签旁边

Html 以引导形式将文本置于标签旁边,html,css,twitter-bootstrap,Html,Css,Twitter Bootstrap,我编写了一个简单的引导表单,如图所示。我希望文本位于标签旁边,我的CSS不起作用。 HTML代码: <title>Bootstrap 101 Template</title> <div class="col-md-6"> <label>Enter the name</label> <div class="col-sm-4 ippos"> <input type="text" cl

我编写了一个简单的引导表单,如图所示。我希望文本位于标签旁边,我的CSS不起作用。
HTML代码:

    <title>Bootstrap 101 Template</title>
<div class="col-md-6">
    <label>Enter the name</label>
    <div class="col-sm-4 ippos">
        <input type="text" class="form-control" placeholder="Name, please!" />
    </div>
</div>
Bootstrap 101模板
输入名称

我怎么做?如何覆盖表单控件的属性?

我不知道为什么它不起作用。试试这个,可能是:

HTML

<title>Bootstrap 101 Template</title>
<div class="col-md-6">
    <label>Enter the name</label>
    <input type="text" class="form-control inline" placeholder="Name, please!" />
</div>
如果不起作用,请在评论中告诉我


Fiddle:

Bootstrap 3有一个名为
form horizontal
的表单元素类,它使标签元素与表单输入内联。您可以在css中混合使用宽度和内联显示,但bootstrap为您提供了一种干净和自定义的css自由方式。要查看它以及它是如何工作的,请访问

您的代码可能如下所示:

<form class="form-horizontal" role="form">
    <div class="form-group">
        <label class="control-label col-xs-4">Enter the name</label>
        <div class="col-xs-8">
            <input type="text" class="form-control" placeholder="Name, please!">
        </div>
     </div>
</form>

输入名称
<form class="form-horizontal" role="form">
    <div class="form-group">
        <label class="control-label col-xs-4">Enter the name</label>
        <div class="col-xs-8">
            <input type="text" class="form-control" placeholder="Name, please!">
        </div>
     </div>
</form>