Reputation: 373
I have got the Bootstrap 3 code below:
<div class="form-group">
<div class="col-sm-3 control-label">
<label>Surname:</label>
</div>
<div class="col-sm-9">
<input class="form-control" type="text" name="surname"><span>!</span>
</div>
And I need to show the exclamation mark next to the input, but it is always on the new line. How to put it nex to the input, please?
Thanks
Upvotes: 2
Views: 12434
Reputation: 362780
If your using a form-inline
it will work like this..
<form class="form-inline">
<div class="form-group">
<label>Surname:</label>
<input class="form-control" type="text" name="surname"> !
</div>
</form>
Upvotes: 2
Reputation: 237
Use this code, it works
<div class="form-group">
<div class="col-sm-3 control-label">
<label>Surname:</label>
</div>
<div class="col-sm-9">
<div class="input-group">
<input class="form-control" type="text" name="surname"><span class="input-group-addon">!</span>
</div>
</div>
Upvotes: 4