Replacing a Submit Button with an Image

Saturday, December 15th, 2007 at 6:04 am
Category: Programming

Images can be used to replace the old boring gray submit buttons, and it can even be done with one line of html code!

Lets look at the html code for a gray submit button:

<input type=”submit” value=”submit”>

That code looks like this:

Which visually can be quite boring and very amateur design-wise. To swap that button out for an image use this line of code instead:

<input type=”image” src=”pathtoimage/imagename.jpg”>

The text after src would be the path to the image you want to use. This is what our form looks like now:

With a little CSS (Cascading Style Sheets), you can change the size of the image and the spacing between the text box and image.

  1. Brin says:

    Hello, nice site :)

  2. postpaidseo says:

    Good way to optimize button. Thanks.

  1. [...]       Sites you may be interested in ? Replacing a Submit Button with an Image | Blog Archive | Designs by Calvin BlogWhy Business Fails at Social Stuff: Part 3 | The Relationship Economy…… ? Book Review: Death [...]

Leave a Reply

You may also like:

Subscribe: