Boris Kozarac Boris Kozarac - 4 months ago 31
CSS Question

Bootstrap button inside input-group

How to make it so that it appears nicely after input page with same height?

<div class="input-group">
<input type="text" class="form-control"/>
<button class="input-group-addon" type="submit">
<i class="fa fa-search"></i>
</button>
</div>


Here is code http://jsfiddle.net/6mcxdjdr/ The first one is original input-group, the second one is something what I am trying to have

Answer

If you follow bootstrap's documentation http://getbootstrap.com/components/#input-groups:

<div class="input-group">
  <input type="text" class="form-control" placeholder="Search for...">
  <span class="input-group-btn">
    <button class="btn btn-default" type="submit">
        <i class="fa fa-search"></i>
    </button>
  </span>
</div>
Comments