Firefox adds 1px to my submit button

I am trying to create my form using CSS. The problem is that I need a “standard” submit and a hyperlink that is styled like a button with CSS.

Now my CSS looks like this:

form .buttons input[type=submit], form .buttons a { padding: 0; margin: 0; } form .buttons input[type=submit], form .buttons a { font-family: Tahoma, sans-serif; font-size: 14px; text-decoration: none; font-weight: bold; color: #565656; } form .buttons input[type=submit] { border: 1px solid black; } form .buttons a { border: 1px solid black; } 

In Firefox, I have a problem adding a 1px add-on around the submit button (as you can see in the screenshot).

Firefox CSS problem

Is there a solution, how can I solve this problem?

+6
source share
2 answers
 input[type="submit"]::-moz-focus-inner { border: 0px; padding: 0px; } 
+13
source

Try also "line-height: normal;" he also fixed a bug in IE.

+1
source

Source: https://habr.com/ru/post/898437/


All Articles