Log in

View Full Version : Form button



lwoolard
07-04-2009, 04:29 PM
How do I modify your oval buttons to work as the submit button in a form?

Thanks.

forum_amnesiac
07-05-2009, 07:40 AM
There are at least 2 ways to do this, 1 by using CSS, as follows:
CSS

button.yes { background:url(submit_normal.gif); }

button.yes:hover { background: url(submit_pressed.gif); }

button.no { background:url(cancel_normal.gif); }

button.no:hover { background: url(cancel_pressed.gif); }

and then using this HTML where you want the buttons to appear in your form.

HTML

<button class="yes" type="submit"></button>
<button class="no" onclick="window.location.href='http://anypage.htm'"></button>

This gives you a "rollover" effect, If you don't want that then just delete the ':hover' lines.

Or directly in HTML by doing this


<input type="image" src="submit.gif" border=0 value="Send This Form" alt="Submit Enquiry" width="101" height="23">

In either solution you substitute the name of your image files for the ones I'ves used as well as changing the various sizes

lwoolard
07-05-2009, 01:14 PM
Thanks. I'm looking for a way to use "sliding door" type buttons so I don't have to have an image file for each button with different text.