Can someone please explain why the <button>
element still has a bit of padding regardless of the styling? Compare the four elements in the snippet below: <button> <a> <span> <div>
which all have identical style applied. The last three look identical but the button stubbornly refuses to lose the padding in Firefox. Inspector shows that it renders identical in Chrome but not Firefox.
Is there a CSS rule I can apply to control this?
.style {
padding: 0px;
border: none;
background-color: #000;
color: #fff;
font-family: sans-serif;
font-size: 14px;
display: inline-block;
}
<button class="style">TEST</button>
<a class="style">TEST</a>
<span class="style">TEST</span>
<div class="style">TEST</div>