FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

image as search button

 


riyadh
can anyone tell me how to use an image as a search button i a search form just like in places in facebook and microsoft.
alalex
Well you could use plain html like this:
Code:
<input type="image" src="picture.gif" name="optional">


And replace "picture.gif" to the actual image filename, or there is other methods using javascript or css.

You can read this article to learn how to do it with css, although there are some issues with some browsers so I wouldn't go that way.
Azmo
or use background:transparent url('picture.jpg') no-repeat 0 0;
Stubru Freak
That's way too hard, the easiest way is to make a submit button with this code:
Code:
<button type="submit"></button>

You can put everything on the button, even images like this:
Code:
<button type="submit"><img src="" alt="" /></button>
imagefree
Stubru Freak wrote:
That's way too hard, the easiest way is to make a submit button with this code:
Code:
<button type="submit"></button>

You can put everything on the button, even images like this:
Code:
<button type="submit"><img src="" alt="" /></button>


Nice!!! i never heared of it. I will definitely try this.

Before this, i always used to use the input tag

Code:
<input type="submit" / >
Stubru Freak
imagefree wrote:
Stubru Freak wrote:
That's way too hard, the easiest way is to make a submit button with this code:
Code:
<button type="submit"></button>

You can put everything on the button, even images like this:
Code:
<button type="submit"><img src="" alt="" /></button>


Nice!!! i never heared of it. I will definitely try this.

Before this, i always used to use the input tag

Code:
<input type="submit" / >


Yes, input is useful for normal buttons, but it's not easy to use if you want something special.
Reply to topic    Frihost Forum Index -> Scripting -> Html, CSS and Javascript

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.