0

In twitter bootstrap documentation, there is an interesting way to append a button right next to the input.

Just an example for illustration:

<div class="input-append">
<input class="span2" id="appendedInputButton" type="text">
<button class="btn" type="button">Go!</button>
</div>

In my case I am trying to utilize this concept but the button is slightly bigger (by one pixel) I can't figure out what is causing this.

enter image description here

I have created a fiddle, I hope someone can point me to the right direction.

http://jsfiddle.net/houmie/FkEnm/2/

1 Answer 1

1

I guess something else in your CSS causing this issue. You can fix this issue by overwriting your css. Make line-height from 20px to 19px on .btn class:

.btn { line-height: 19px } 

Working DEMO

Sign up to request clarification or add additional context in comments.

4 Comments

I really don't have any custom css here. So I don't understand why this happening. Same problem is in this fiddle, this time the text field is bigger than the button and your trick doesn't help here. :( jsfiddle.net/houmie/GcjkC/2
weird, could be a Firefox problem. :(
Had a quick look in Firefox and adding height: 30px seems to fix the issue in both browsers.
@Houman Buttons and input take on inherited styles differently. A button generally needs its own declaration for font-family, font-size etc. So if you have globals set up they won't make it to your buttons.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.