Jump to content

Recommended Posts

Posted

Hello to experts.

 

I have one problem:

 

There are few buttons on the site and I need code for them, when one button is clicked to stay at this point ( pressed look with different color )and when other is clicked, first one is back in his normal state and this second is clicked with this second color ( another button image ).

 

Can you help me somehow?

 

Thank you very much in advance.

 

regards,

 

DREAMBUILDS

Posted

If you're using dreamweaver, in the menu go to insert -> image objects -> rollover image. Just select the two images, and the code will be inserted for you.

 

Or go to:

http://javascriptkit.com/mousewhipper/index.htm

 

It will tell you where to insert your code.

 

Thank you, I already did that, but the point is that I want menu button to stay down ( showing rollower image ) on press and do not move from this position until I press another button. This is the mystery to me... :(

Posted

If your buttons are links to other pages, it sounds as if you want the "current page" code where the current page button is different until you click another button to go to another page.

 

See http://www.wickham43.net/highlighthome.php the third item where button images have been used. I could have used sprites but didn't there. The main reason for using sprites is to avoid a flash in the display on hover while a new image is downloaded. A sprite just moves the position of an image so that another part of a combined image shows without a flash.

 

In my example I didn't need sprites because the display will flash anyway when moving to another page, but would have helped if I also wanted a different image on hover.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...