It's difficult to pinpoint the issue without seeing your additional styling, but there are a couple of potential problems in your 'html' code.
First Issue
You placed the input-sm
class on the div
with the input-group-addon
. According to the Bootstrap documentation, the input-sm
class should be added to the div
with the input-group
class:
Sizing
Add the relative form sizing classes to the .input-group itself and contents within will automatically resize—no need for repeating the form control size classes on each element.
Second Issue
The default display
property of the div
element is set to block
, whereas the input-group-addon
and other Bootstrap form
and input
classes have a display
property of table-cell
. To fix the formatting issue, ensure that you don't change the display
property to block
on relevant classes.
For example:
.input-group-addon.input-sm {
display: block;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet"/>
<div class="form-group">
<div class="input-group">
<div class="input-group-addon input-sm">
<span class="glyphicon glyphicon-search"></span>
</div>
<input id="kwtab_fieldfilter" class="form-control input-sm" type="text" placeholder="Filter" />
</div>
</div>
To summarize, organize your html
like this:
/*****************************************
Do not change the display property
of any of these classes to block.
.input-group
.form-control
.input-group-addon
.input-group-btn
the default display value of these
classes is table-cell.
******************************************/
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet"/>
<div class="form-group">
<div class="input-group input-sm">
<span class="input-group-addon">
<span class="glyphicon glyphicon-search"></span>
</span>
<input id="kwtab_fieldfilter" class="form-control input-sm" type="text" placeholder="Filter" />
</div>
</div>
I hope this explanation helps you resolve the issue.