Welcome to WebmasterWorld Guest from

Forum Moderators: not2easy

Message Too Old, No Replies

Changing link color



4:11 am on Apr 30, 2007 (gmt 0)

10+ Year Member

Ok this is driving me nuts and I can't find it anywhere. I don't work on sites enough to remember these things :(

I'm trying to change the behavior of my text.

For example:
.Navtext {
font-family: "Times New Roman", Times, serif;
font-size: 16px;
font-style: normal;
font-weight: bold;
color: #FFFFFF;

This is my normal navigation area text size. Not necessarily for navigation.

BUT, I want to make it so that when I have a link that it doesn't change color ever, not visited, not hovering, nothing. The only thing I do want it to do is Underline..

Sorry, I know this is beginner 101 newbie CSS but, I really spent about 1.5 hours looking for this! Sad huh! Sorry, I only do this on the side rarely..

Matt Probert

7:05 am on Apr 30, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

Just add styles for the anchors:

a:link (color: #FFFFFF)
a:active (color: #FFFFFF)
a:visited (color: #FFFFFF)

But, remember that styles are only suggested to the target browser, they are not enforced, and a browser may implement their own styles.



7:27 am on Apr 30, 2007 (gmt 0)

10+ Year Member

You could actually combine that rule…

.Navtext a:link, 
.Navtext a:visited,
.Navtext a:focus,
.Navtext a:active { color: #fff;
text-decoration: none; }

.Navtext a:hover { text-decoration: underline; }

Which is a bit neater :)


1:15 pm on Apr 30, 2007 (gmt 0)

10+ Year Member

yea setek that's what I did, as I recalled it as such. The noodle has too much stuff up there so I figured I was doing something wrong..

alas it is not working. I remembered once working on something in php long ago that wasn't 'taking' then once I cleared my cache it worked when I reviewed it in various browsers...

However that is not the case in this...case.

Started to make me mad that I'm spending so much time on the stupid stuff and almost no time on my actual content for this site. My next step is working without tables and using CSS only...should be fun since I can't even get something simple like this down! ARGH!


1:36 pm on Apr 30, 2007 (gmt 0)

10+ Year Member

WOH, bizarre. OK for some reason I had two stylesheets and was working on the wrong one.

Yea I'm an idiot and yea that worked great, thanks..sorry for the idiot post. :(


Featured Threads

Hot Threads This Week

Hot Threads This Month