Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial

Scott Raymond
6,542 PointsCannot get a:visited styling to work. Ideas?
I cannot get visited link to show different color. All the others work fine. I have them in the proper order of link, visited, hover, then active. What am I doing wrong??
a {color: #00e; }
a:visited { color: #551a8b; }
a:hover { background-color: #06e; font-weight: bold; }
a:active { text-decoration: none; }
2 Answers

Greg Kaleka
39,020 PointsWorks fine for me. You've got something else going on. Got more code to post?

Cindy Lea
Courses Plus Student 6,497 PointsIm assuming yourefreshed the browser after preview?
Scott Raymond
6,542 PointsScott Raymond
6,542 PointsMaybe I am doing something wrong here
I'm super green at all this so I appreciate your help.
Greg Kaleka
39,020 PointsGreg Kaleka
39,020 PointsYou're not doing anything wrong - I updated the codepen above. It's all working perfectly. Why do you think it's not? The links won't actually work in the codepen, but if you right click and open the links in a new tab, you'll see they turn purple.
Note if you click on a link and then hit the back button, they won't show as visited until you refresh the page. I suspect that's what is happening
Scott Raymond
6,542 PointsScott Raymond
6,542 PointsThanks for the help Greg. It's actually part of my pre-work assignments for my 12 wk coding boot camp and the instructor said the visited link was not working. So, the only reason I thought it wasn't right or wasn't working was because that's the feedback I got. But I thought it was correct too : )
Thanks for the input!