Recipe 7.8. Creating an Image Submit Button


Problem

You want to create a custom Submit button with an image file, such as the one in Figure 7-14.

Solution

Use the input element with the type attribute set to image:

<input type="image" name="submit" src="/books/3/27/1/html/2/submit.gif" /> 

Figure 7-14. The magnifying glass icon acts a Submit button


Discussion

Although inserting an image as a Submit button utilizes HTML, once it's placed in a web page, the Submit button image can be modified through CSS properties like border and margin.

See Also

The HTML specification for the input element at http://www.w3.org/TR/html4/interact/forms.html#h-17.4.




CSS Cookbook
CSS Cookbook, 2nd Edition
ISBN: 0596527411
EAN: 2147483647
Year: 2006
Pages: 235

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net