/ Published in: CSS

Summarised snippet of Natbat's article: http://natbat.net/2009/Jun/10/styling-buttons-as-links/
Any link that that initiates an action, rather than just changing a page should semantically be a form with a submit button not a l ink. However you can still make the button look like a link.
Any link that that initiates an action, rather than just changing a page should semantically be a form with a submit button not a l ink. However you can still make the button look like a link.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<style> button.link { -moz-user-select: text; background: none; border: none; color: blue; cursor: pointer; font-size: 1em; margin: 0; padding: 0; text-align: left; } button.link:hover span { text-decoration: underline; } </style> <form action="" method="post"> <button type="submit" class="link"><span>Delete</span></button> </form>
Comments
