Jump to content

Image as Submit button


Recommended Posts

Hello, i want to use an image as a submit button but i get several problems.

First i tried to use the

<input type="image" src="images/btn.png" alt="submit"/>

The code above sending x and y coordinates and i want to remove it. Then i tried to use css.

#goButton { 
   cursor: pointer;
   border: 0;
   vertical-align: middle;
   display: inline-block; 
   background: transparent url(images/btn.png) no-repeat top left;
   height: 28px; 
   width: 28px; 
}

With the button tag in submit form.

<button id="goButton" type="submit"></button>

Its working but then i realize that the image didnt show up when the image setting on the browser is turned off.

I want the image shows up even when the browsers image setting is turned off, just like the one in http://en.m.wikipedia.org

i have tried to copy its css but i still failed to get what i want. Can someone give me the solution? thanks.

Link to comment
Share on other sites

Its working but then i realize that the image didnt show up when the image setting on the browser is turned off.
That is the point of that setting: so no images appear.

 

The first code you posted should have worked perfectly. Could you post a screenshot on what is happening?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...