/ Published in: CSS
Inspired by http://particletree.com/features/rediscovering-the-button-element/
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<!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>