6

Forms have changed since 2.4.3 and This would have worked before but not anymore.

This is the current code I have for my search bar.

<li>
   <div class="input-group" id="fifteenMargin">
      <input type="text" class="form-control" placeholder="Search" name="srch-term" id="srch-term">
   </div>
</li>

This is what it currently looks like.

enter image description here

I would like it to eventually look like this.

enter image description here

Although this question is close this to this one its different as that is just having a button on the outside without space between the two. This is how to get it into the search bar.

Jack
  • 2,891
  • 11
  • 48
  • 65

4 Answers4

10

Try this..

.input-group-btn > .btn {
  border-left-width:0;left:-2px;
  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}
.input-group .form-control:focus {
 box-shadow:none;
 -webkit-box-shadow:none; 
 border-color:#cccccc; 
}

You may want to use a special CSS class instead of overriding all of the input-groups

Demo: http://bootply.com/86446

Carol Skelly
  • 351,302
  • 90
  • 710
  • 624
1

try

<div class="input-group">
    <span class="input-group-addon">
        <i class="glyphicon glyphicon-user"></i>
    </span>
    <input type="text" name="login" class="form-control" placeholder="Ваш логин">
</div>
Ivan
  • 2,316
  • 2
  • 24
  • 22
0

You can't technically place it "inside" the search box, rather place your submit OVER the search box via absolute positioning.

dv8withn8
  • 333
  • 2
  • 4
  • 11
0

I got it done using fake div.
FIDDLE

.styleSelect {
    position:absolute;
    z-index:10;
  width: 168px;
  height: 34px;
  border: 1px solid #000;
}
vishalkin
  • 1,175
  • 2
  • 12
  • 24
  • 1
    Doesn't using absolute position not work cross browsers? As it may not be exact should the width change. – Jack Oct 08 '13 at 19:44