Web Hosting Talk







View Full Version : Links color won't change? CSS problem? School Site


Dan B
04-28-2008, 11:24 PM
Hello WHT,

I take part in helping my webmaster at school, and my teacher doesn't know the solution for this.

http://eghs.d214.org/athletics/baseball/bbb.html


The black parts are links, but as you can see when I hover it changes to the right color. How can I make it so the color isn't black, but the same color as the hover. I tried changing the a:link but then my quick links on top change from black to whatever color. I need the quicklinks to stay black, while the schedule and photos stay the light yellow wheat color.

Thanks!

rmfred
04-29-2008, 11:49 AM
To be brutally honest you should start over... You have such a hodge podge of style attributes it is a wonder anything works. Remove all the inline style attributes and get them into the css; you're just asking for trouble trying to use both embedded and inline styles.

From what I can make out of your code you are trying to assign a span class called linkscolor to those links? Yet you don't have a class named linkscolor in your css.

The quick and dirty solution should be then to actually create a class named linkscolor and see what happens.... and don't use a span for it; but put it on the link itself. < a class="linkscolor" href="blah">
That may or may not work depending on the specificity of all your styles; and I didn't test it because I didn't want to take the time to clean up the code.

Dan B
04-29-2008, 02:19 PM
haha yea well this was my teachers template so didn't feel like deleting anything. Thanks for your advice. It worked! I've also deleted all the junk.

Thanks again.

rmfred
04-29-2008, 03:09 PM
No Problem. Glad it worked out for you.