/ Published in: CSS
Inspired by http://particletree.com/features/rediscovering-the-button-element/
Expand |
Embed | Plain Text
<!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>
Comments
Subscribe to comments
You need to login to post a comment.

Forgot to add:
button::-moz-focus-inner { border: 0; padding: 0; }(From http://www.aheadcreative.com/removing-unwanted-button-padding-in-firefox/)