I'd like to make <button> and <a> to look the same. I've found a similar post that suggests adding
box-sizing: content-box;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
However, it still has a slight height difference when viewed in Firefox. Here's the jsfiddle. Any help?
http://jsfiddle.net/H3HK8/22/
button::-moz-focus-inner,
.btn::-moz-focus-inner
{
border: 0;
padding: 0;
}
This fixes the middle one, still working on the final input.
From here http://www.aheadcreative.com/removing-unwanted-button-padding-in-firefox/
UPDATE
I suspect for the final example you are falling victim to this http://www.cssnewbie.com/input-button-line-height-bug/#.USzRd6Wcmzc
You can see the line height has no effect in this example http://jsfiddle.net/H3HK8/24/, even with !important added.
And while trying to work around this rule, I discovered something that makes the situation a little more dire: browser-defined !important rules cannot be over-ruled by author-defined !important rules. This rule cannot be overruled by a CSS file, an inline style — anything.
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