[HTML/CSS] I want an image and some text overlayed for the submit button for

Hari A

New member
a form.. How do I do it? I'm not sure if this involves my stylesheet, but basically I want to submit a form using an image (input type=image?) WITH some text over the image. I tried using a standard input type=submit, value=text + styling with a background image, but the background goes behind the button. Any ways around this??

Think like a standard text button, with a background gradient, where the text is separated from the gradient.
 
I would make the text part of the image - unless it has to be dynamic text. This is easier. Then:

<form id="my" action="/form.php">
<!--INPUT STUFF-->

<img src="/path/to/picture.jpg" onclick="
document.gettElementById('my').submit();
" alt="" />

</form>
 
Back
Top