Jump to content

Recommended Posts

Posted

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.

Posted
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?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...