标识文本框上面有标签

时间:2016-02-07 21:14:48

标签: html css twitter-bootstrap

我有三个文本框,它们在一行上。 第一个文本框上面有标签,第二个文本框没有标签,导致缩进缩进。我怎样才能解决这个问题 ?

<form>
    <div class="form-group col-xs-4 col-md-4">
        <label for="name" class="control-label">Line Height</label>
        <input type="email" value='' class="form-control" id="name" placeholder="Ime" />
    </div>
    <div class="form-group col-xs-4 col-md-4">
        <input type="email" value='' class="form-control" id="name" placeholder="Ime" />
    </div>
    <div class="form-group col-xs-4 col-md-4">
        <label for="name" class="control-label">Padding Bottom</label>
        <input type="email" value='' class="form-control" id="name" placeholder="Ime" />
    </div>
</form>

http://jsfiddle.net/quyB6/77/

1 个答案:

答案 0 :(得分:1)

这个怎么样?

<form>
    <div class="form-group col-xs-4 col-md-4">
        <label for="name" class="control-label">Line Height</label>
        <input type="email" value='' class="form-control" id="name" placeholder="Ime">
    </div>
    <div class="form-group col-xs-4 col-md-4">
        <label for="name" class="control-label">&nbsp;</label>
        <input type="email" value='' class="form-control" id="name" placeholder="Ime">
    </div>
    <div class="form-group col-xs-4 col-md-4">
        <label for="name" class="control-label">Padding Bottom</label>
        <input type="email" value='' class="form-control" id="name" placeholder="Ime">
    </div>
</form>