Custom button form submit

I am trying to create a simple button for form submission. Pretty simple... however I want to use a specific css sprite button... I have tried a number of variations of the following... this works the best, but I still get a Submit or Submit Query text over the button... thoughts?

<label>
<input type="image" name="submit" id="next" title="" alt="">
<a id="next" title=""></a></input>
</label>
pixelscapeAsked:
Who is Participating?
 
Michel PlungjanIT ExpertCommented:
That is not valid html

<input type="image" name="submit" id="next" title="" alt="" />

or
<script>
document.write('<a href="#" onclick="document.forms[0].submit(); return false"><img src="sprite.gif" border="0"/></a>')
</script>
<noscript>
<input type="image" name="submit" id="next" title="" alt="" />
</noscript>

Open in new window

is. But what browsers insist on giving you that text?

0
 
pixelscapeAuthor Commented:
Safari
0
 
Marco GasiFreelancerCommented:
You can use css also: use <input type='submit'> and give it a class. Then in css file you c write something like this:

.myButton{
  width: 100px;
  height: 24px;
  margin: 0;
  padding-bottom: 4px;
  border: 0;
  cursor: pointer;  hand-shaped cursor
  cursor: hand; /* for IE 5.x */
  background: transparent url('path_to_image') top center no-repeat;
  color:black;
  font-size:11px;
}

Cheers
0
 
pixelscapeAuthor Commented:
I just used color: transparent on the buttons css. Thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.