我想让标签不在输入字段上方,但在左侧。
<form method="post" action="" role="form" class="form-inline"> <div class="form-group"> <label for="rg-from">Ab: </label> <input type="text" id="rg-from" name="rg-from" value="" class="form-control"> </div> <div class="form-group"> <label for="rg-to">Bis: </label> <input type="text" id="rg-to" name="rg-to" value="" class="form-control"> </div> <div class="form-group"> <input type="button" value="Clear" class="btn btn-default btn-clear"> <input type="submit" value="Los!" class="btn btn-primary"> </div> </form>
这段代码给了我:
我想拥有:
解决方法
将< label>外面的form-group:
<form class="form-inline"> <label for="rg-from">Ab: </label> <div class="form-group"> <input type="text" id="rg-from" name="rg-from" value="" class="form-control"> </div> <!-- rest of form --> </form>