Dear Friends,
I am working on a site these days, I want to use one image in submit button .I did that but it is not working in ie … it works fine with firefox …but it does work in ie.
this is what I did.
<tr class=“input_text” align=“right”>
<td class="but_td"> <input class="but" type="submit" value=" "/></td>
</tr>
.but{background-image:url(…/…/images_slice/sign-button.gif); background-repeat:no-repeat;border:none; width:115px;height:34px;}
.but_td{margin-right:20px;width:115px;height:34px; margin-top:-2px; border:none;}
kindly help
Noddy
ralphm
May 10, 2011, 12:38pm
2
You can change the input type to “image” if you want an image as a button:
<input type="image" src="submit.jpg"
alt="Submit your details"/>
More info
vaibhavcoder:
Dear Friends,
I am working on a site these days, I want to use one image in submit button .I did that but it is not working in ie … it works fine with firefox …but it does work in ie.
this is what I did.
<tr class=“input_text” align=“right”>
<td class="but_td"> <input class="but" type="submit" value=" "/></td>
</tr>
.but{background-image:url(…/…/images_slice/sign-button.gif); background-repeat:no-repeat;border:none; width:115px;height:34px;}
.but_td{margin-right:20px;width:115px;height:34px; margin-top:-2px; border:none;}
kindly help
Noddy
You shouldn’t remove the text from the value attribute of the submit button as that makes it unusable for screenreaders.
Here’s an accessible way to do it. It also works with images off as the submit button is placed over the label text. You can read more [URL=“http://www.sitepoint.com/forums/html-xhtml-52/using-image-submit-button-754125.html”]in this thread .