I have a beautiful little CSS image that needs to be a button. I've tried about 20 different methods, none of which work. I just either get a blank nothing or a border with nothing inside.
The html: http://lrroberts0122.github.com/DWS/lab6/level-2/
The image: http://lrroberts0122.github.com/DWS/lab6/level-2/images/button.png
The CSS: http://lrroberts0122.github.com/DWS/lab6/level-2/css/main.css
I can't change it to "submit" for certain reasons, so I need to figure out how to make this work with CSS. Thank you for your help!
The <input type="image"> defines an image as a submit button.
To add images to a page, we use the <img> inline element. The <img> element is a self-containing, or empty, element, which means that it doesn't wrap any other content and it exists as a single tag. For the <img> element to work, a src attribute and value must be included to specify the source of the image.
Use an image submit button, as the doc says:
<input type="image">
defines an image as a submit button
<input type=image src=button.png alt="Submit feedback">
(I would not use an image suggesting snailmail when setting up an online form, but maybe there is some reason to create such associations.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With