Reputation: 874
Fiddle — just open it in Chrome and Firefox, all latest.
There is .button class in my CSS — I use it for all kind of buttons: a.button, button.button, etc.
As you see, there are no difference in Chrome between button.button and any other *.button elements. As you see in FF — button.button is slightly bigger than any other *.buttons.
How can I made FF to render any buttons properly, like Chrome do?
UPDATE: This is absolutely not a duplicate of any post on SO.
StackOverflow asks for a code:
.button {
font: normal 100% Arial, sans-serif;
position: relative;
display: inline-block;
text-align: center;
text-decoration: none;
vertical-align: middle;
color: #00f;
background-color: transparent;
border: 1px solid #00f;
border-radius: 3px;
user-select: none;
outline: 0;
cursor: pointer;
white-space: nowrap;
}
.button_medium {
padding: 0 12px;
}
.button__text {
font-weight: 400;
display: inline-block;
line-height: 1;
vertical-align: top;
white-space: nowrap;
}
.button__text_medium {
font-size: 90%;
line-height: 28px;
letter-spacing: -1px;
}
<div style="padding:5em;">
<button class="button button_medium" type="button">
<span class="button__text button__text_medium">Save</span>
</button>
<label class="button button_medium">
<span class="button__text button__text_medium">Save</span>
</label>
<span class="button button_medium">
<span class="button__text button__text_medium">Save</span>
</span>
<a class="button button_medium">
<span class="button__text button__text_medium">Save</span>
</a>
</div>
Upvotes: 0
Views: 62
Reputation: 49044
Have you tried? AFAIK it is really a duplicate. See also: http://css-tricks.com/forums/topic/button-padding-issue/
The following code will fix your issue:
button::-moz-focus-inner {
padding: 0 !important;
border: 0 none !important;
}
Upvotes: 1