W3C home > Mailing lists > Public > www-style@w3.org > July 2001

Understanding :hover

From: Andy <lordpixel@mac.com>
Date: Wed, 04 Jul 2001 23:36:34 -0400
Message-ID: <3B43E0C2.39F19136@mac.com>
To: www-style@w3.org
Here's a testcase I made for a Mozilla bug:

<title>Img Hover Test</title>
        img { border: thick solid red }
        img:hover { border: thick solid blue }
Hello<img src="http://www.mozilla.org/images/mozilla-banner.gif">

<p><a href="http://www.mozilla.org/">
World<img src="http://www.mozilla.org/images/mozilla-banner.gif">


(also available here: http://bugzilla.mozilla.org/showattachment.cgi?attach_id=37800)

Try it in a Mozilla build (since it seems IE still doesn't support :hover)
What's weird about it is the upper image works how I'd expect, but the
lower one (the one inside the <a> element) doesn't react to the mouseover.

Why is that? Someone posted to the bug and suggested it was correct
behaviour, but I can't for the life of me see why that would be the
case. Why would it being inside an <a> prevent the hover effect from working?

AndyT (lordpixel)
Received on Wednesday, 4 July 2001 23:36:39 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:58 UTC