|
-
Jan 28th, 2002, 08:45 AM
#1
Thread Starter
PowerPoster
CSS A:hover...
I'm using this code to apply a background colour to hyperlinks when the mouse moves over them.
Code:
A:hover {
text-decoration : none;
color : #0080C0;
background-color : #DEDFDF;
}
However it also colours the background of image links. How can I get it to only apply to text links?
Thanks
-
Jan 28th, 2002, 12:06 PM
#2
Black Cat
CSS:
A.ClassName:hover { }
HTML:
<a class="ClassName">
So you can control the specific tags you want. Just remember that A.ClassName will inherit from the generic A.
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Jan 28th, 2002, 02:04 PM
#3
Thread Starter
PowerPoster
ah! cheers
Anybody know what happens if a non css compliant browser views the anchor html with a class attr.? Does it screw up?
-
Jan 29th, 2002, 03:57 AM
#4
Hyperactive Member
Another work-around
However it also colours the background of image links. How can I get it to only apply to text links?
Try marking border=0 for the images... then it won't apply, i think.
- Jemima.
-
Jan 29th, 2002, 06:19 AM
#5
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|