Kerby82
Kerby82

Reputation: 5146

Input group text area not aligned with input-group-button

I'm using the following input-group with bootstrap:

<div class="input-group" style="padding-left: 20px;">

    <input type="text" name="s" class="form-control input-sm">

    <span class="input-group-btn">
      <button class="btn btn-default input-sm" type="submit"><span class="fa fa-search"></span></button>
    </span>

</div>

The outcome is a text-area not aligned with the button: enter image description here

I want the text-area to be aligned with the input group button

Upvotes: 1

Views: 3331

Answers (2)

Sirat Binte Siddique
Sirat Binte Siddique

Reputation: 453

yes, they are in a bootstrap column .

  <div class="row">
    <div class="col-sm-6">

    </div> 
    <div class="col-sm-6">
        " your code should be there "
    </div> 
  </div>

see here , your code is given here.

try it , it's working

Upvotes: 1

Peter Girnus
Peter Girnus

Reputation: 2729

Make sure its formatted correctly in a bootstrap column, it's working fine on my end.

HTML:

<div class="col-sm-6">
   <div class="input-group" style="padding-left: 20px;">
       <input type="text" name="s" class="form-control input-sm">
       <span class="input-group-btn">
         <button class="btn btn-default input-sm" type="submit"><span class="fa fa-search"></span></button>
       </span>
   </div>
</div> 

CodePen Example

Upvotes: 0

Related Questions