PDA

View Full Version : a:hover?


Guro
12-04-2007, 06:27 PM
I've made a small icon that I want to show on the left side of each link in my menu when the arrow is over it. Haha, hard to explain :P In my menu, I dont want the icon on the left side of the links to be visible until the arrow is over the link.
What do I do? Put the image tag in front of every link, and use the a: hover (in the stylesheet) to decide when I can see the icon? Is this even possible? It is the same icon that should be shown next to every link.

Gamini
12-05-2007, 02:38 AM
It is possible, sort of like a css dropdown.


<html>
<head>

<style type="text/css">

#links img { visibility: hidden; }
#links:hover img { visibility: visible; }

</style>
</head>
<body>

<div id="links"><img src="img.jpg"><a href="#">Somewhere</a></div>
</body>
</html>