Entries Comments

Alex Mace’s Blog

Life & Web Development

Styling buttons in Firefox

This is more of a note to remind me in future. Take this bit of HTML:

<button><span>Save</span></button>

If you set the button and the span to have padding: 0, Firefox will still show the button with some padding. You can get rid of this with the following CSS:

button::-moz-focus-inner {
    border: 0;
    padding: 0;
}

Sorted!
 
 

Tags: , ,

Leave a Reply

(required)

(required)