Use some HTML similar to this (where ... means you need to insert the appropriate attributes needed for your form):
<form id="search" ...>
<input type="text" ...>
<button></button>
</form>
Then use CSS to set position: relativein the element formand position: absolute; right: 0on the button. Set the background image on the button and use text-indent: -9999emto hide the button text outside the screen.
If you want to more accurately emulate the jQuery solution, I suggest installing Firebug for Firefox and independently checking the HTML and CSS element.
source
share