3

I am trying place search icon inside text box.But,Its displaying end of the row.

<div class="row input-group">
    <input class="col-lg-3 col-md-3 col-sm-5 col-xs-5 form-control" type="text" id="searchroleName" placeholder="Search here"  aria-describedby="basic-addon2"/>
    <span class="input-group-addon fa fa-search"  id="basic-addon2"></span>
</div>

https://jsfiddle.net/9dxryetu/

Its displaying like this enter image description here

Super User
  • 9,448
  • 3
  • 31
  • 47
user7397787
  • 1,410
  • 7
  • 28
  • 42
  • Did you even look [at the documentation](http://getbootstrap.com/components/#input-groups)? – Vucko Apr 24 '17 at 13:00

3 Answers3

3

Just remove row class from input-group div, updated fiddle

Super User
  • 9,448
  • 3
  • 31
  • 47
2
<div class="form-group has-feedback">
    <label class="control-label" for="inputSuccess2">Name</label>
    <input type="text" class="form-control" id="inputSuccess2"/>
    <span class="glyphicon glyphicon-search form-control-feedback"></span>
</div>
Unknown_Coder
  • 764
  • 6
  • 24
1

Just checkout this jsFiddle. The problem was that you were not properly implementing .row include .container-fluid also to prevent -15px margin.

https://jsfiddle.net/fLLkwaqw

Climb Tree
  • 490
  • 1
  • 7
  • 15