Previous Message
Next Message

Getting the a:hover, etc to work in <SPAN>

Sent by Gary Every on 24 June 2004 19:07


Okay, please bear with me, I'm a newbie with CSS

I placed:
DIV A {
	link,visited { color : #000000;}
	hover { color : #EFEFEF;}
}
Inside my style, then

<div>
<tr><td><a href .. </a></td></tr>
</div>

But it made no difference. Am I looking at it the wrong way?




Gary Every
Sr. UNIX Administrator
Ingram Entertainment Inc.
2 Ingram Blvd, La Vergne, TN 37089
"Pay It Forward!"


-----Original Message-----
From: Chris Heilmann [EMAIL-REMOVED]] 
Sent: Thursday, June 24, 2004 12:02 PM
To: Gary Every
Cc: [EMAIL-REMOVED]
Subject: Re: [css-d] Getting the a:hover, etc to work in <SPAN>



Embedding styles again is not what CSS should be used for. Instead you
use contextual selectors.

For example you define all your settings for links

A {color:#ccc;}

and if you want to change it only for a section of the page, embed the
links in another element

DIV A {color:#999;}

That way all the links in the document will be light grey, but all links
_inside_ DIV tags will be a darker grey.

<p><a href ... /a></p>  Will be light grey
<div><a href ... /a></div> will be darker grey

You can even give the div a class or an ID, to distinguish them even
more within the DIVs.

http://www.w3.org/TR/REC-CSS1#contextual-selectors

HTH

Chris



-- 
Chris Heilmann
The mighty pen: http://icant.co.uk/
Learn to let go! http://ltlg.icant.co.uk
Binaries: http://www.onlinetools.org/

______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread:

Possibly related: