Reputation: 9570
Please check my code at http://jsfiddle.net/TccN5/.
It has a gap between the input text box and the button on the right. For the very same markup on Bootstrap site the input box and the button has a nice tight fit with no gap.
Why do I have the gap?
Upvotes: 1
Views: 2552
Reputation: 2463
Use input-prepend
and input-append
<div class="btn-group input-prepend input-append">
<input type="button" class="btn" value="Prev">
<input type="text" value="">
<input type="button" class="btn" value="Next">
<div>
Upvotes: 0
Reputation: 48793
You have extra whitespace character
s between button
and input
elements. Place button
tag immediately after input
element:
<input type="text" /><button class="btn" type="button">Any</button>
Or alternatively, apply this css styles:
.input-append{
font-size:0;
}
Upvotes: 4
Reputation: 2095
Im not sure why that is, but this is how i fixed it. maybe you got some of your own css conflicting with the text field.
here's the jsfiddle with the fix http://jsfiddle.net/TccN5/2/
I just added
style="margin-right:-4px"
to your
<input type="text">
Upvotes: 0