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! While you're at it, check out some resources Treehouse students have shared here.

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

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,690 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.