PDA

View Full Version : CSS Selectors & links...


Warlord
12-16-2008, 01:15 AM
I want to change the link color on a webpage but only for links in the CSS selector .tcat

I've tried several variations, but this is the closest I think I've gotten:


a.tcat:link {text-decoration: underline; color:white;}
a.tcat:visited {text-decoration: underline; color:white;}
a.tcat:active {text-decoration: underline; color:white;}
a.tcat:hover {text-decoration: underline; color: red;}

I actually had it working before, but somehow I screwed it up and now I can't figure out how I did it. Can someone throw me a bone please? :D

--------------- Added 1229398714 at 1229398714 ---------------

From what I'm reading, I have to manually add a new class to each link anchor tag that I want to change the link color for???

Can't I just use the class inside the table tag that surrounds these links somehow? I'm positive I did it before. It's driving me nuts. :/

--------------- Added 1229399627 at 1229399627 ---------------

Ha! Got it! I knew I had done it before. :D

Here's the code for anyone who's interested.

.tcat a:link {text-decoration: underline; color:white;}
.tcat a:visited {text-decoration: underline; color:white;}
.tcat a:active {text-decoration: underline; color:white;}
.tcat a:hover {text-decoration: underline; color: red;}