These forums are currently read-only due to receiving more spam than actual discussion. Sorry.

It is currently Sat Dec 02, 2017 4:13 pm Advanced search

Hover on Image Map

If you are stuck or have questions regarding HTML or other Web technologies, ask your questions here. No question too dumb!

Hover on Image Map

Postby netzhuffle » Tue Sep 25, 2012 7:47 pm

In an image map, one sets the hyperlinks with area elements. How is it possible to detect mouse hover (CSS :hover) or mouseover (JavaScript onmouseover) on those links or set a title to those hyperlinks?

Since the area elements aren’t inside the img element itself, area:hover or :link:hover doesn’t work, neither does an onmouseover or title attribute in the area tag.
User avatar
netzhuffle
<h6>
 
Posts: 2
Joined: Tue Sep 25, 2012 7:29 pm

Re: Hover on Image Map

Postby zcorpan » Wed Sep 26, 2012 9:16 am

The spec says:
Pointing device interaction with an image associated with a set of layered shapes per the above algorithm must result in the relevant user interaction events being first fired to the top-most shape covering the point that the pointing device indicated, if any, or to the image element itself, if there is no shape covering that point. User agents may also allow individual area elements representing hyperlinks to be selected and activated (e.g. using a keyboard).

http://www.whatwg.org/specs/web-apps/cu ... ng-model-0
zcorpan
<article>
 
Posts: 807
Joined: Tue Feb 06, 2007 8:29 pm
Location: Sweden

Re: Hover on Image Map

Postby netzhuffle » Wed Sep 26, 2012 4:30 pm

Thanks!

So it’s a bug in Webkit.
User avatar
netzhuffle
<h6>
 
Posts: 2
Joined: Tue Sep 25, 2012 7:29 pm


Return to Help & Advice

Who is online

Users browsing this forum: No registered users and 0 guests