Remove the complete styling of an HTML button/submit

Saif Bechan picture Saif Bechan · Mar 17, 2010 · Viewed 241.3k times · Source

Is there a way of completely removing the styling of a button in Internet Explorer? I use a css sprite for my button, and everything looks ok.

But when I click the button, it moves to the top a little, it makes it look out of shape. Is there a css click state, or mousedown? I don't know what triggers that state.

I know it's not a really big deal, but sometimes it's the small things that matter.

Answer

Kevin Leary picture Kevin Leary · Aug 26, 2017

I think this provides a more thorough approach:

button, input[type="submit"], input[type="reset"] {
	background: none;
	color: inherit;
	border: none;
	padding: 0;
	font: inherit;
	cursor: pointer;
	outline: inherit;
}
<button>Example</button>