< Back

Document Subject: Add an image to an html input button
Hint Short Cut: Add this to your code & documentation to help you find this page.
http://#HTMLInputButtonImage or http://A555F9/nn.nsf/ByAlias/HTMLInputButtonImage

To add an image to an html input button use this code.




 

This code allows the button to have an image and text. Note the extra sapce in the Value.

<input type="button" style="background-image:url('icon.gif'); background-repeat: no-repeat " value=" Submit" onClick="docSubmit(true, 'whatever');" />

 

You may also need to set the background colour to be transparent:

background-color:transparent