Return to Snippet

Revision: 20593
at November 19, 2009 15:41 by cssbutton


Initial Code
<!DOCTYPE html>
<html>
<head>
	<title>Reset Button Tag</title>
	
	<style type="text/css">
		button { background: none; border: none; margin: 0; padding: 0; font-size: 0; line-height: 0; width: auto; overflow: visible; }
		button div { border: 1px solid; font-size: 12px; line-height: 12px; }
	</style>
</head>

<body>
	<form><button type="submit"><div>Hello</div></button></form>
	
	<!-- By zeroing out the button completely and applying styles to the inner div, you avoid a lot of cross-browser height/width inconsistencies. -->
</body>
</html>

Initial URL

                                

Initial Description
Inspired by http://particletree.com/features/rediscovering-the-button-element/

Initial Title
Reset Button Tag

Initial Tags
css, button

Initial Language
CSS