I have a bunch if <a>
tags that have unique ids associated with them and children elements that are <img>
. I would like to have the images hidden (display:none
) by default and have them become visible when you hover over the <a>
tag to which they belong. However, currently when I try this behavior using the #a-tag-id:hover
selector in my css, the image does not become visible in the event of hovering.
Not really sure what I am doing wrong.
here is a fiddle with the same behavior.
http://jsfiddle.net/ebbnormal/bobmrud0/1/
Here is the original haml/css:
#map
%a#saddleback_point
=image_tag('saddleback_college.png', width:'300px')
%a#citrus_point
=image_tag('citrus_college.png', width:'300px')
%a#sonrise_point
=image_tag('sonrise.png', width:'300px')
%a#vegas_point
=image_tag('vegas.png', width:'300px')
%a#tennessee_point
=image_tag('tennessee.png', width:'300px')
%a#chestnut_point
=image_tag('chestnut.png', width:'300px')
%a#saint_point
=image_tag('saint.png', width:'300px')
%a#boston_point
=image_tag('boston.png', width:'300px')
%a#fisher_point
=image_tag('fisher.png', width:'300px')
#citrus_point img{
top:360px;
bottom:0px;
left:240px;
position:absolute;
display:none; //TODO This is broken!
}
#citrus_point:hover img{
display:block;
}