Return to Snippet

Revision: 18044
at September 22, 2009 04:23 by PeteW


Initial Code
<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>

Initial URL


Initial Description
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.

Initial Title
Make HTML buttons look like links

Initial Tags
form, link, html, button

Initial Language
CSS