Mouse over effect for images?

A place for discussion about skinning and design. Before posting questions here you should review the documentation about creating skins.

This thread is closed to new posts. You must sign in to post in the forums.
8/30/2012 3:29:43 PM
Gravatar
Total Posts 62

Mouse over effect for images?

Is there an easy way to implement mouse over effect for images?

8/31/2012 5:42:37 AM
Gravatar
Total Posts 355

Re: Mouse over effect for images?

What sort of effects did you have in mind, and specifically which images do you want the effect?

8/31/2012 10:52:04 AM
Gravatar
Total Posts 62

Re: Mouse over effect for images?

Thank you for getting back to me. I have about 10-15 images on the website that I use as a buttons/links and I would like to add mouse over effect by using 2 images. I found there is a way to do this with styles, but I would have to have a style for each of those button which doesn't seem like good approach. So, I was just wondering if there is a better way to do this with mojoportal.

8/31/2012 11:21:20 AM
Gravatar
Total Posts 355

Re: Mouse over effect for images?

Actually, using CSS is probably your best bet, unless you want to use jQuery.  Just assign a class to your images, and include your CSS in the file style-artisteer-overrides.css in your site's theme. Are you going to use the same images & effects for all the button images?

8/31/2012 11:59:35 AM
Gravatar
Total Posts 2187

Re: Mouse over effect for images?

Hi,

Using CSS is the best solution for what you would like to accomplish. However, I do not recommend loading a different image on hover because the image will not be loaded by the browser until the user hovers. This will cause your default state image to disappear and nothing will be shown until the hover state image is loaded by the browser. To alleviate this issue, you should use an image sprite which is really nothing more than a single image file with all of your various depictions on one canvas. CSS Tricks has a great article about sprites. You can see a very simple image sprite in action on this site (mojoportal.com) in the forums. The "Post Reply" icon is an image sprite and the CSS for the hover state just changes the background position of the image making the it display the "glow" around the icon.

HTH,
Joe D.

8/31/2012 1:19:38 PM
Gravatar
Total Posts 62

Re: Mouse over effect for images?

Excellent! I will give image sprite a shot! Thank you both!

You must sign in to post in the forums. This thread is closed to new posts.