开发者

Hover effect won't trigger on a link styled in CSS

I have a simple page in which I'm trying to style an a link. I can 开发者_StackOverflowstyle the normal state fine, but the hover state never triggers.

The relevant portion of my stylesheet is:

a.faqquestion {
  color: orange;
}

a.faqquestion:hover {
    text-decoration: underline;
  cursor: hand;
}

and my code looks like this:

<a onClick="toggleMe('FAQ1')" class="faqquestion">1. How many licenses do I need?</a>

Can someone see what I'm doing wrong? The full page is available at: http://www.haast.ca/Pages/Products/HAAST/FAQ.htm and FAQ's 1 and 2 are styled with the class "faqquestion". Thanks, Michelle


A few things:

  1. cursor should be pointer not hand
  2. add the faqquestion class to your links
  3. your links should have a target so just add a href="/wherever they should go" or href="#"


Internet Explorer is ignoring the a.faqquestion:hover production because your cursor definition is invalid.

Changing cursor: hand; to cursor: pointer; fixes the problem.


The page works fine on my browser, you just forgot to add the class faqquestion to the other links


It works:

http://jsfiddle.net/Steve_Wellens/tjW6Q/

So, I'm guessing your CSS is in a separate file that's not being loaded.


IT is your just not noticing it because you have nothing changed in the second css, because the HTML tahe < a Come with underline. and try spacing out the different css variable's, like a .faqquestion:hove, and it will probably work if you remove the a, because your calling the same tag with two different css tags cause you call the < a with faqquestion

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜