Solved

CSS Changing Hover link in multiple places

Posted on 2000-04-29
4
169 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
  • 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Showing your events from Google Calendar in Google Maps Why? I travel all week and I thought it would be ideal if staff in office knew where I was based on my calendar. (OK real reason: my son wanted to see where I would be working, and I thoug…
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 …
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
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…

777 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