inline form example
Created by: sjdeere
at http://getbootstrap.com/css/#forms-inline
the inline form example
<form class="form-inline" role="form">
<div class="form-group">
<div class="input-group">
<label class="sr-only" for="exampleInputEmail2">Email address</label>
<div class="input-group-addon">@</div>
<input type="email" class="form-control" id="exampleInputEmail2" placeholder="Enter email">
</div>
</div>
<div class="form-group">
<label class="sr-only" for="exampleInputPassword2">Password</label>
<input type="password" class="form-control" id="exampleInputPassword2" placeholder="Password">
</div>
<div class="checkbox">
<label>
<input type="checkbox"> Remember me
</label>
</div>
<button type="submit" class="btn btn-default">Sign in</button>
</form>
I have found that the <label>
needs to be Outside the <div class="input-group">
otherwise you don't get a rounded input at the start
this works
<form class="form-inline" role="form">
<div class="form-group">
<label class="sr-only" for="exampleInputEmail2">Email address</label>
<div class="input-group">
<!-- moved label outside -->
<div class="input-group-addon">@</div>
<input type="email" class="form-control" id="exampleInputEmail2" placeholder="Enter email">
</div>
</div>
<div class="form-group">
<label class="sr-only" for="exampleInputPassword2">Password</label>
<input type="password" class="form-control" id="exampleInputPassword2" placeholder="Password">
</div>
<div class="checkbox">
<label>
<input type="checkbox"> Remember me
</label>
</div>
<button type="submit" class="btn btn-default">Sign in</button>
</form>