CSS Changing Hover link in multiple places

I have the hover link property set for the main page.  I want to override that setting for a particular bunch of href links.

How can I do this.
gretchenAsked:
Who is Participating?
 
CJ_SConnect With a Mentor Commented:
You set the general hover like:

a:hover {...}

now, to get another classname with another hover style an all you use:

a.classname:hover {  }

inside the hover you put whatever it needs. Then in the particular it should use the other hover, you use:
<a href='...' class='classname'>blah</a>

Hope that made things clear, good luck.
CJ
0
 
gretchenAuthor Commented:
Yes, that made perfect sense and worked.

I did grade thids but I have one question.

If I did have multiple properties like below
a.recordarea:hover {color: #0000ff}
a.recordarea:link { color: #000000}

is there a way to do them all together?

a.recordarea { hover: #0000ff
               link: #000000 }

I know the above does not work.

0
 
CJ_SCommented:
No, if you write a.recordarea { } it will say that it is the normal link. Not the hover.

0
 
gretchenAuthor Commented:
thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.