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?
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.
Hover is intended for links. Without the HREF the tag is simply an anchor.
In other words...
<a name="target"></a>
is an ANCHOR within a page that...
<a href="#target">go there</a>
would be a LINK to.
Since ANCHORs don't have visual representation on a page.. a :hover would be useless.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With