there is a difference in how firefox and chrome render the padding in css. what appears correct in chrome is extra padded in firefox. is there a way to solve?
.button {
font-family: helvetica, arial;
font-size: 64px;
width: 70px;
height: 45px;
font-weight: bold;
padding: 0px;
padding-top: 25px;
background-color: #000;
color: #fff;
text-align: center;
float: right;
margin: 7px 10px 0 0;
}
Is Firefox Faster Than Chrome? No, Chrome is significantly faster and more memory-efficient than Firefox. Is Firefox Really Better Than Chrome? Firefox is a more private and secure browser than Chrome, but Chrome is faster and contains more features.
Stop running out of memoryChrome uses up to 1.77x more memory than Firefox. If your computer is already low on memory, this can cause a significant slowdown.
Firefox's default privacy settings are more protective than those of Chrome and Edge, and the browser has more privacy options under the hood, too.
height controls the actual height of the element (basically the distance from border-bottom to border-top ) whereas padding controls the distance between the content and the border.
If your .button is a button
this might be a mozilla inner focus thing... try this?
.button::-moz-focus-inner { border: 0; padding: 0; margin:0; }
Firefox and Chrome render padding
exactly the same way. Your problem is elsewhere.
Are you using a reset CSS? If not, the default line-height
declaration might be interfering with the rendering of your button.
For one, your height
is way smaller than your font-size
. Since you don't have overflow
specified, your height
will always be extended to at least font-size
(or whatever your line-height
specifies).
If your .button
class is actually a <button>
element, also apply superUntitled fix.
The focus-inner fix works but I also add negative top and bottom margins to get it to the right height. e.g.:
*::-moz-focus-inner {
padding: 0;
border: 0;
margin-top:-1px;
margin-bottom:-1px;
}
I used to love Firefox, but it has become a bloated mess and fell off my Christmas list years ago.
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