When using Bootstrap 3 "form-inline" within a <div>
, I noticed that the div seems to be nested within the form-inline.
This is how my code looks:
HTML
<div class="wrapper">
<div class="form-inline">
<div class="row">
<label>Name:</label>
<div class="form-group inner-addon right-addon pull-right">
<i style="font-size: 10px; padding: 8px 6px;" class="glyphicon glyphicon-search"></i>
<input class="form-control input-sm" data-bind="textInput: nameFilter, stopBubble:true" placeholder="<name>" type="text">
</div>
</div>
</div>
<div class="form-inline">
<div class="row">
<label>Name2:</label>
<div class="form-group inner-addon right-addon pull-right">
<i style="font-size: 10px; padding: 8px 6px;" class="glyphicon glyphicon-search"></i>
<input class="form-control input-sm" data-bind="textInput: nameFilter, stopBubble:true" placeholder="<name>" type="text">
</div>
</div>
</div>
</div>
CSS
.wrapper{
float: left;
}
.inner-addon {
position: relative;
margin-bottom: 0px !important;
}
/* style icon */
.inner-addon .glyphicon{
position: absolute;
padding: 10px;
pointer-events: none;
}
.right-addon .glyphicon{
right: 0px;
}
Can anyone point out where I might be going wrong?
Check out the Bootply fiddle here
I made some adjustments by adding more rows and a pull-right to demonstrate what I am aiming for. Apologies for not including that information initially.