Jump to content


Photo

Link Colors


  • Please log in to reply
3 replies to this topic

#1 brokenhope

brokenhope
  • Members
  • PipPip
  • Member
  • 12 posts

Posted 24 March 2006 - 09:55 PM

On my page the body and navigation bar are almost oppisite shades, body is dark, and the navigation bar is lighter, and they both contain links... so obviously there needs to be 2 link colors... but how do I do this?

a:link {color: #3E4953}
a:visited {color: #3E4953}
a.body:link {color: #FFFFFF; text-decoration: none;}
a.body:visited {color: #FFFFFF; text-decoration: none;}
a.body:hover {color: #FFFFFF; text-decoration: none;}
a.body:active {color: #FFFFFF; text-decoration: none;}

Is the CSS for the links... and those are the correct things for the navigation, but when I have links in the body you cant even see them... so I need 2 styles of links colors... how do I do this?

#2 moberemk

moberemk
  • Members
  • PipPipPip
  • Advanced Member
  • 695 posts

Posted 25 March 2006 - 02:26 AM

Just keep the main colors that you're going to use in most of the site as you normally would and then for the other side, just add another selector before the a:whatever declaration. That will make it so the style will only apply to links within things of that type, I.E. div#left a:link { stylehere }.
Disclaimer: No matter how harsh I may be, I'm always IMO only.

#3 brokenhope

brokenhope
  • Members
  • PipPip
  • Member
  • 12 posts

Posted 25 March 2006 - 03:25 AM

[!--quoteo(post=358119:date=Mar 24 2006, 09:26 PM:name=moberemk)--][div class=\'quotetop\']QUOTE(moberemk @ Mar 24 2006, 09:26 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Just keep the main colors that you're going to use in most of the site as you normally would and then for the other side, just add another selector before the a:whatever declaration. That will make it so the style will only apply to links within things of that type, I.E. div#left a:link { stylehere }.
[/quote]

I dont really understand that... and I figured out there was an error in the orignal style it is actually this:
a:link {color: #3E4953}
a:visited {color: #3E4953}
a:link {color: #FFFFFF; text-decoration: none;}
a:visited {color: #FFFFFF; text-decoration: none;}
a:hover {color: #FFFFFF; text-decoration: none;}
a:active {color: #FFFFFF; text-decoration: none;}

Also I dont use divs, I use tables, and since everything is in tables, and (td's actually), it wouldnt really be of much help... is there any way I could add those properties to a table class I already have?

td#(what is left for?) a:link {color: #FFFFFF}

I also already have a td class for the td in the body, if that will make a diffrence or cause a problem... because its where I need the new link colors at.


Thanks for replying.

#4 brokenhope

brokenhope
  • Members
  • PipPip
  • Member
  • 12 posts

Posted 25 March 2006 - 04:19 AM

Actually that worked. Except instead of # I used . and instead of div, it was td. But thanks and for anyone else reading this wondering what worked, here is an example:

td.bodyText a:active {color: #FFFFFF;}





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users