You can see the problem in Jsfiddle
This is my code:
CSS
.btn {
text-align: center;
color: #333;
font-weight: 700;
font-size: 11px;
font-family: tahoma, verdana, arial, helvetica;
background: -webkit-linear-gradient(#fefefe, #e7e7e7);
background: -o-linear-gradient(#fefefe, #e7e7e7);
background: -moz-linear-gradient(#fefefe, #e7e7e7);
background: linear-gradient(#fefefe, #e7e7e7);
height: 24px;
width: auto;
overflow: visible;
border: 1px solid #c4c4c4;
padding: 0 10px;
line-height: 22px;
border-radius: 3px;
}
.btn:hover {
color: #111;
border: 1px solid #555;
}
HTML
<input type="submit" value="Submit" class="btn" />
This button looks OK in Chrome, Opera, MIE but not in Firefox.
In all browsers, the space above and below the "Submit" text is 7px and 7 px.
In Firefox - 8px and 6 px.
Is there any way to fix this problem in Firefox?
Add the following CSS to reset the padding and border properties for your element.
Updated JSFiddle: http://jsfiddle.net/r5vvac82/1/
.btn::-moz-focus-inner {
padding:0;
border:0;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With