Why doesn't a:hover work on an anchor without an href attribute?

css, css-selectors, hover

Solution

IE doesn't support a:hover in a tag without href. You can use href="#" or href="Javascript:void(0);" however this last option probably won't work on IE6 either.

Or use Javascript mouseover/mouseout.

Problem

In my application, I can't get the `a:hover` css style to work when my anchor tag doesn't have an href attribute. Is there any reason for this?

Original source