Reputation: 51918
When I search for a css button generator they always have code that styles an anchor.
<a href="#" class="button">The Button</a>
But I'm wondering why they don't ever try to style a generic button:
<input type="button" value="The Button" />
is it because it's harder to style an input of type button?
Upvotes: 2
Views: 1154
Reputation: 3523
The styling will make buttons and anchors look the same. However the functional aspects are what make you decide to use a button or a link.
I would recommend using a link if you are going to follow a link, and a button if you want to submit a form or perform an action, say AJAX call.
Upvotes: 4
Reputation: 3196
Typically the input buttons are going to look like whatever the users computer defaults to for a button. Using anchor tags along with image sprites lets you have more control over what the "button" is going to look like.
Upvotes: 2