Log In · Register

 
rollovers
ryanoman
post Dec 15 2005, 01:47 PM
Post #1


=]
*****

Group: Member
Posts: 712
Joined: May 2004
Member No: 15,626



Is it still possible to create a rollover effect for a certain part of an image? For example, I'd like to rollover effects to the buttons of the navigation part of this layout:
http://www.ryanoman.net/nwq/nwq.php Is it possible? I still have the .PSD.
 
 
Start new topic
Replies
*Libertie*
post Dec 15 2005, 03:25 PM
Post #2





Guest






Yes. I'll give you an example..

Say I use this image as my navigation bar:


And I want each individual portion of the image to be a link that turns light blue when I hover over it. I'll use this image for that:


So basically, you make ALL the rollovers in just one image. So. Now the code.



That code up there tells the browser basically that there will be an image swap when you hover over the image. It doesn't know how yet, just that it will happen.



So that was the actual image swap. Now you're finished with the scripting, so you need to actually position your image. To do this, you need to use absolute positioning to put your images on top of each other:



Change those values as needed, but notice that I defined an image map. That's what will tell the browser which part of the image to change and which part to leave alone, as well as making those parts links. So to finish it up:




Now, if you want to see a preview, here's my full code (with my occasional commentary), just save as an html file and upload it to see the full results:

 

Posts in this topic


Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: