Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I have images for Submit and Reset buttons?

Status
Not open for further replies.

Julianne

Technical User
Jan 30, 2002
156
GB
I've realised I can use an image for the Submit button in a form by just changing the "type" to "image" and specifying a URL. However, it's going to look a bit odd sitting beside a standard Reset button, so what I'd like to know is what code I would need to use in order to have both buttons as images - if it's possible, of course.

Many thanks.
 
Well this is one option:

.xyz {background: url('img.gif');}

<input type=&quot;submit&quot; class=&quot;xyz&quot;>
<input type=&quot;reset&quot; class=&quot;xyz&quot;>

you may need to do some fixing like removing the borders etc etc


É ::
 
you could always use an image and an onclick event.

<img src=&quot;reset.gif&quot; height=&quot;15&quot; width=&quot;35&quot; onclick=&quot;document.myForm.reset();&quot;> Gary Haran
 
Leevalleylions?
I'm a fan of Lahti Pelicans and Belfast Giants! Two useless teams but ya gotta support someone! :)

É ::
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top