ASP.NET - Stylish submit buttons

Most people would agree the default look of submit buttons is rather dull and unattractive. Using CSS and a nice gradient background image, it's easy to transform a form button from a duck to a swan.

Demo:

<style type="text/css">
.formbutton{
cursor:pointer;
border:outset 1px #ccc;
background:#999;
color:#666;
font-weight:bold;
padding: 1px 2px;
background:url(formbg.gif) repeat-x left top;
}
</style>

The image used:


<form>
<input type="text" style="width: 200px; border: 1px solid gray" />
<input type="submit" class="formbutton" value="Submit" />
</form>
I hope this ll help you. A 'Thank You' would be nice!

Leave a Reply