Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can an Image act like a Button?

Status
Not open for further replies.

LucyL

Technical User
Feb 20, 2002
113
US
Hi,
Can an Image act like a Button?
Help Appreciated.
 
ya!

<input type=&quot;image&quot; name=&quot;Submit&quot; value=&quot;Submit&quot; src=&quot;image.gif&quot;>

or

<img src=&quot;image.gif&quot; onclick=&quot;javascript:window.location='page.htm'&quot;> [Hammer]
Nike Failed Slogans -- &quot;Just Don't Do It!&quot;
 
or better yet...simpler tooo no javascript

<a href=&quot;page.htm&quot;><img src=&quot;file.gif&quot;></a> [Hammer]
Nike Failed Slogans -- &quot;Just Don't Do It!&quot;
 
or CSS for this advantage

The look of button is maintained sitewide, Text can be changed by changing value and the image which is a background is loaded only once for the whole site if used with an external stylesheet

See an example here
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top