jml3188
08-13-2004, 10:00 AM
I've run into a problem. I have a CSS for the entire page which makes all of the links white. I want this because the background at the top and bottom where the navigation and Copyright sections is black. The white links works well with it.
The problem arises when in the middle of the page, when I have a gray background and I want the links to be BLACK because white on gray is very hard to see.
If someone would like to help me with this, I will pay $20. Thanks for your help.
Zopester
08-13-2004, 10:45 AM
Please, put your money away, it's embarrassing. :)
Style your main links as black. So:
a:link, a:visited {
color:#000;
text-decoration:underline;
}
a:hover, a:active {
color:#f60;
text-decoration:underline;
}
In this example, the link colours change to orange when you hover and click them, but you could simply concatenate all the rules into a:link, a:visited, a:active, a:hover and be done if you wanted them to be black no matter what.
Then for the header and footer, create a class of links. Call it whatever you like - for now, I'll call it specialLinks:
a.specialLink:link, a.specialLink:visited {
color:#fff;
text-decoration:underline;
}
a.specialLink:hover, a.specialLink:active {
color:#f60;
text-decoration:underline;
}
Once again I've shown the hover and active states as a lovely shade of orange. Make sure .specialLinks go after the main links in the CSS file. Otherwise your main link colours will override these. It's a cascading style sheet, remember? ;)
Just add <a class="specialLink"... > to your links in the navigation and footer and you're good to go.
And keep your $20. This is on me. :)
jml3188
08-13-2004, 10:59 AM
Oh thanks! It works, I'm so excited. Thank you very much.
Zopester
08-13-2004, 11:04 AM
No problem at all. Glad to have been of help. :)
stripeyteapot
08-13-2004, 11:06 AM
I'm so excited.
Zopester, you sure know how to turn someone on :D
jml3188
08-13-2004, 11:10 AM
Originally posted by pmoduk2
Zopester, you sure know how to turn someone on :D
:stickout:
Zopester
08-13-2004, 11:12 AM
*looks in mirror, checks hair, does a Fonz* Ehhhhh! :D
When you've got it, you've got it...