Using an Image Submit Button within an HTML Web Page Form

by sabitha 2010-09-17 15:45:01

If you're using an HTML form on your web site and would like to use an image submit button instead of the boring standard submit button, this HTML code is for you.

In order for your form's input box and your image submit button to line up properly, you will need to place it within an HTML table. In addition, unless your image has a transparent background, you will need to set the table background color to the same color as the image background so that it will seamlessly blend together.
<FORM METHOD=post ACTION="/cgi-bin/example.cgi">
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="2">
<TR>
<TD BGCOLOR="#8463FF"><INPUT type="text" size="10"></TD>
<TD BGCOLOR="#8463FF" VALIGN="Middle"><INPUT type="image" name="search" src="search.gif" border="0"></TD>
</TR>
</TABLE>
</FORM>

Tagged in:

1073
like
0
dislike
0
mail
flag

You must LOGIN to add comments