Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

a:hover not working with simple anchors

0 views
Skip to first unread message

TR

unread,
May 15, 2004, 9:59:38 PM5/15/04
to
I cannot get the a:hover pseudo-class to work in IE6, although it's
working in the other browsers I've tested. The cursor changes from arrow
to the I-bar insertion cursor with hover, but the underline is not
applied.

Here's the CSS:

A:hover {
text-decoration: underline;
color: #3333cc;
}

And here's an example of the HTML:

<A onclick='FAR(1)'>Kentucky Derby</a>

This problem appears to be caused by the fact that there is no HREF in
my anchor, but a javascript function call. Does Microsoft define the
hover pseudo-class as a feature of the HREF rather than of the ANCHOR?
If I insert an empty HREF (href='') it works.

Thanks
TR

Little Dave

unread,
May 20, 2004, 5:14:04 PM5/20/04
to
TR wrote:
> I cannot get the a:hover pseudo-class to work in IE6, although it's
> working in the other browsers I've tested. The cursor changes from arrow
> to the I-bar insertion cursor with hover, but the underline is not
> applied.
>
> Here's the CSS:
>
> A:hover {
> text-decoration: underline;
> color: #3333cc;
> }
>
> And here's an example of the HTML:
>
> <A onclick='FAR(1)'>Kentucky Derby</a>
>

Hmm.. interesting.

Instead of onclick, try

<a href="javascript:FAR(1)">Kentucky Derby</a>


Also, all your HTML elements should be lowercase.

Dave


--
Dave,
http://www.daveholloway.co.uk
Everyone feel free to talk to me on ICQ: 283691316 or
http://wwp.icq.com/283691316

0 new messages