Last Updated: September 09, 2019
·
790
· fredrikbergqvist

Extra padding on buttons in Firefox

Buttons contains extra padding that can't be removed by just setting padding:0; on the element.

Use the code below to remove the padding.

input[type=submit]::-moz-focus-inner,
input[type=reset]::-moz-focus-inner,
input[type=button]::-moz-focus-inner,
button::-moz-focus-inner {
    padding:0;
    margin:0;
    -moz-box-sizing:content-box;
}