Reputation: 12689
Is there anyway to get boostrap's form-control
for input
to be inline without using the grid system i.e. col-md-2
?
Because this is the only feature of bootstrap that I find astoundingly annoying.
Upvotes: 0
Views: 1235
Reputation: 5566
You can try is :-
<form class="form-inline">
<div class="form-group">
<label for="email">Email address:</label>
<input type="email" class="form-control" id="email">
</div>
<div class="form-group">
<label for="pwd">Password:</label>
<input type="password" class="form-control" id="pwd">
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
It should work.... there's a class .form-inline to make the form-control display inline.
Upvotes: 1
Reputation: 12689
Here's how I made a workaround.
<input type="text" class="input-sm" style='box-shadow: none; border: 1px solid lightgray'>
This makes it look like bootstrap's text input without it taking up an entire row or requiring you to play with the grid system.
If anyone has a better answer feel free to make your input
Upvotes: 0