How can I replace my submit button with an image?
css, forms, html, submit
Solution
You can use an image button on the button
<input type=image src=PATH_TO_YOUR_IMAGE alt="Submit Me">
or set submit button background to an image using css
input[type=submit] {
background:url(BACKGROUND_IMAGE_PATH_HERE);
border:0;
display:block;
height:Change_TO_backgroundimageheight;
width: Change_To_backgroundimageWidth;
}
Problem
I have made this simple search box and want to use an svg image as the submit button, how could I do that without any javascript? here's the form: ``` <form method="post" action="#"> <input type="text" name="rechercher" id="rechercher" placeholder="Rechercher"/> <input type="submit" value="none" onerror="this.onerror=null; this.src='images/loupe.png'"/> </form> ```