Solved

CSS Changing Hover link in multiple places

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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Introduction The Google Maps API offers various ways to draw dynamic and static maps.  Using a combination of PHP and JavaScript, you can draw active JavaScript maps that allow pan-and-zoom in the client browser window.  You can also draw "static" …
Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now