Jump to content

[SOLVED] Menu with changing images


Andy17

Recommended Posts

Dear freaks,

 

 

I am in the process of making a website and I am currently struggling with my menu. I am trying to make a horizontal menu that consists of multiple images that are links (Home, About, Downloads, etc.). I would like each image to change when people hover their mouse over them, but not to the same image. I am making effects with the text I will put on the images, so that's why they cannot be the same.

 

So basically if I have a button with the text "Home" on it, I want the text "Home" to have effects on when the mouse is on top of it. This means that I need different "hover images" for each menu image.

 

I hope that came out somewhat understandable - things are harder to explain than I thought.

 

Anyways, I made it happen with one image, but I was wondering if there is an easy way to make more of these buttons but with different background images (like a line of buttons)?

 

My example (hover mouse over the number):

http://test.jokeheaven.eu/

 

My CSS:

http://test.jokeheaven.eu/style.css

 

Example of what I want (multiple menu images with different effects):

http://www.theflyerwall.co.uk/

 

 

Thank you in advance for your help and I hope that this was all understandable.

Link to comment
Share on other sites

if its a link, just do:

 

a.home {

display: block;

width: 100px;

height: 20px;

background: url(../images/some_image.png) no-repeat;

}

a.home:hover {

background-image: url(../images/some_image_hover.png);

}

 

html:

 

<a class="home"></a>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.