homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

Changing link color

10+ Year Member

Msg#: 3325853 posted 4:11 am on Apr 30, 2007 (gmt 0)

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

WebmasterWorld Senior Member 10+ Year Member

Msg#: 3325853 posted 7:05 am on Apr 30, 2007 (gmt 0)

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.



5+ Year Member

Msg#: 3325853 posted 7:27 am on Apr 30, 2007 (gmt 0)

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 :)


10+ Year Member

Msg#: 3325853 posted 1:15 pm on Apr 30, 2007 (gmt 0)

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!


10+ Year Member

Msg#: 3325853 posted 1:36 pm on Apr 30, 2007 (gmt 0)

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. :(

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved