Jump to content

Recommended Posts

Trying to figure how how to turn my nav bar into where if you hover over one of the parts of the nav bar it turns into the highlighted version of that part.

 

Web Site: http://kansasoutlawwrestling.com/v3/index.php

 

Nav Bar: http://kansasoutlawwrestling.com/v3/images/nav.png

 

Highlighted Nav Bar: http://kansasoutlawwrestling.com/v3/images/nav2.png

Link to comment
https://forums.phpfreaks.com/topic/193949-css-sprites/
Share on other sites

You need to split the entire picture into seperate HTML elements.

Then use the style 'background-image: ...' on each element.

 

For the effect you can use :hover in your css.

 

This should explain everything:

http://themes.cmsmadesimple.org/Howto/Image_menu.html

Link to comment
https://forums.phpfreaks.com/topic/193949-css-sprites/#findComment-1020692
Share on other sites

You just need to combine your nav and hover nav picture, put the nav hover underneath so it is a total of 428px in height.

 

You can then set each of the buttons to the background-position, then when you need to hover you just need to change it so it shows the hover one.

 

This this article on css tricks should give you a helping hand on any info you need about css sprites.

Link to comment
https://forums.phpfreaks.com/topic/193949-css-sprites/#findComment-1020767
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.