Forum Moderators: not2easy

Message Too Old, No Replies

link classes for block elements?

is it possible?

         

mutedgirl

4:12 am on Jan 1, 2004 (gmt 0)

10+ Year Member



I know how to properly assign different link classes to links (ie- <a class="linkclasshere"...blahblahblah) But my question is...is it possible to apply these classes to a div or a span element? I have a list of links on my sidebar that need to be a different color (due to the darker background color in the sidebar) but I don't want to have to add 'class="linkclasshere"' to EVERY link (there are a lot!) Any help? Thanks! :)

mbauser2

5:43 am on Jan 1, 2004 (gmt 0)

10+ Year Member



Add a class to the DIV containing the links, then create a child selector style like this:

DIV#side A { color: green ; }

That will make any A inside the class "side" DIV green.

DrDoc

5:38 pm on Jan 1, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to Webmaster World!

mbauser2 is right, except that

div#side a
applies to links inside a div with the ID
side
. If you use the class name
side
the selector should be
div.side a
insted. :)

mutedgirl

7:47 pm on Jan 1, 2004 (gmt 0)

10+ Year Member



oh that worked! Thank you! :)