Lunack
Lunack

Reputation: 373

Put some text next to Bootstrap 3 input

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

Answers (2)

Carol Skelly
Carol Skelly

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>

http://www.bootply.com/119169

Upvotes: 2

Jagadesh K
Jagadesh K

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

Related Questions