Jump to content

Link Colors


brokenhope

Recommended Posts

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?

[code]
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;}
[/code]

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?
Link to comment
Share on other sites

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 }.
Link to comment
Share on other sites

[!--quoteo(post=358119:date=Mar 24 2006, 09:26 PM:name=moberemk)--][div class=\'quotetop\']QUOTE(moberemk @ Mar 24 2006, 09:26 PM) [snapback]358119[/snapback][/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:
[code]
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;}
[/code]

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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.