Solved

CSS Changing Hover link in multiple places

Posted on 2000-04-29
4
172 Views
Last Modified: 2010-04-09
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.
0
Comment
Question by:gretchen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 22

Accepted Solution

by:
CJ_S earned 25 total points
ID: 2763431
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
 

Author Comment

by:gretchen
ID: 2763875
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
 
LVL 22

Expert Comment

by:CJ_S
ID: 2763889
No, if you write a.recordarea { } it will say that it is the normal link. Not the hover.

0
 

Author Comment

by:gretchen
ID: 2763891
thanks
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Find out what you should include to make the best professional email signature for your organization.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question