views:

132

answers:

3

I am working on a site that uses three small images as links to twitter, facebook, etc. I have a callout image that I would like to appear when I mouse over the image.

The key here is that the callout image not interfere with the other images and text on the page.

Is there a handy solution that would meet this need?

+1  A: 

Have you tried MooTools? They have a lot of Javascript utilities that might meet your requirements.

fbrereto
I think any major javascript framework may have utility methods that may meet his requirements....
Matt Briggs
I have looked at jQuery, but I am open and will take a look. Thanks.
fmz
+1  A: 

Old skool:

Combine the images into one and then use a client side imagemap with onmouseover events which make the appropriate divs visible.

New skool:

Use CSS hover psuedo class. Good example here: http://www.dynamicdrive.com/style/csslibrary/item/css-popup-image-viewer/ (won't work in all browsers)

Dan Bennett
Dan this one looks like something that might work. I'll give it a try. Thanks!
fmz
Worked perfectly. Thank you!
fmz
+3  A: 

not positive but it sounds like u can just assign the background image and use the background-position property to show the appropriate image during hover and non-hover state

a.twitter { display: block; width: 16px; height: 16px;
            background: url(/images/twitter-hover.png) no-repeat 0 0; }
a.twitter:hover { background-position: 0 16px }

that's assuming a 16x32 sprite comprised of two 16x16 buttons (non-hover and hover) stacked vertically.

this is a rudimentary example http://www.dynamicsitesolutions.com/css/background-image-switching/

Neil Sarkar
I have considered this but the three images are small (32 x 32) and the designers callout is much bigger (50 x 150) and would overlap other content. Thanks for the feedback.
fmz