Search code examples
htmlcssimagebuttonsubmit-button

How to Make Button Tag Only Show Image Inside of it


I have the following code for a submit button on my website:

<button name="searchterm" type="submit" id="searchterm"><img src="images/ICON_Go.jpg"></button> 

and the following CSS:

#searchterm {
    margin:0px;
    padding:0px;
    white-space:nowrap;
    width:auto;
    overflow:visible;
}

Demo

and this is how it appears on the live website:

enter image description here

I would just like it to be the green go image. I do not want the button graphic surrounding the image. How can I do this?

Thank you for any help. All help is appreciated.


Solution

  • Add this to remove the background color and the border:

    #searchterm {
        border:0;
        background:transparent.
    }
    

    Working Fiddle