2 replies [Last post]
dugawug
Offline
Regular
Last seen: 14 years 8 weeks ago
Joined: 2008-06-19
Posts: 13
Points: 0

I have a class I set up for particular links all throughout my site.

a.textLinks {color:#5C762C; font-size:.7em;}

Then I wanted to add a visited state to this class:

a:visited.textLinks {color:#666;}

But now when you click any single one of these links on a page, it'll change the color out on all of them! It treats the whole class as one visited or not visited link!

Is there any way around this?

wolfcry911
wolfcry911's picture
Offline
Guru
MA, USA
Last seen: 8 years 30 weeks ago
MA, USA
Timezone: GMT-5
Joined: 2004-09-01
Posts: 3224
Points: 237

try changing it to

try changing it to this:
a.textLinks:visited {color:#666;}

also, have you cleared your cache? perhaps you've already visited the links?

dugawug
Offline
Regular
Last seen: 14 years 8 weeks ago
Joined: 2008-06-19
Posts: 13
Points: 0

thanks, but i think i

thanks, but i think i figured it out. the problem is with the href on all my links. since i'm developing, they currently all go to href="". so that's why it's counting all the links as visited. if i go to {blank} once, then it greys out all the links also going there. makes sense now.