Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS How to Make a Website Customizing Colors and Fonts Use Color in CSS

Pseudo Class :vistited

Even before I added the :visited pseudo class, the 'a' elements in the 'nav' would still stay the same color even if I clicked on them. Why is this?

5 Answers

Sean T. Unwin
Sean T. Unwin
28,672 Points

When you set the color on an <a> tag that sets the default color for all states. I may be mistaken on this point, however.

More importantly though it is a security feature that most browsers have implemented. Read more about it.

Andrew Youngwerth
Andrew Youngwerth
10,188 Points

You must have a style sheet somewhere that already affects visited anchor elements. That or sometimes the color change can be difficult to see.

I have normalize.css applied, but in that stylesheet I could not find anything for :visited.

Andrew Youngwerth
Andrew Youngwerth
10,188 Points

look at the color closely. you'll probably notice there is a slight change.

Awesome! Thanks guys.