icone does not stand next to input bootstrap

Asked

Viewed 1,185 times

3

I’m trying to put an icon next to my input using bootstrap, but it always stays down

My code is like this:

<div class="row">
    <div class="col-md-12">

            <div class="form-group has-warning has-feedback">
                <label class="control-label">Nome</label>
                <input type="text" class="form-control">
                <span class="glyphicon glyphicon-warning-sign form-control-feedback"></span>
            </div>
    </div>
</div>

What am I doing wrong?

3 answers

2


Is missing the div with the class input-group, see how the example on the official bootstrap website version 3:

<div class="input-group">
  <span class="input-group-addon">@</span>
  <input type="text" class="form-control" placeholder="Username">
</div>
  • I leave this div inside a formgroup ?

0

Your HTML looks right. I even made that fiddle to demonstrate. Experiment with other column sizes such as col-sm-12 and col-lg-12.

Another possibility is that there are other styles in your own CSS files interfering with Bootstrap styles.

0

Dude, I just solved a positioning problem with bootstrap and it was a certain class in bootstrap css. I advise you to change your bootstrap class. I saw that the padding class Brand(My case) had a certain value and put it to 0. Well, what you should do, in my view is to take the class that messes with what is inconsistent in your project and make the manual changes corresponding to what you want.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.