Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

CSS Changing Hover link in multiple places

Posted on 2000-04-29
4
Medium Priority
?
175 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 100 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

Industry Leaders: 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

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

610 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