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 trialnarvesh pradhan
2,958 Pointswhy you use nav a nav a:visited?? can't we use nav a:visited instead of that?? what would be the effect
explain
Daniel Newman
5,995 PointsDaniel Newman
5,995 PointsIf I understand your question correctly, I believe that having, nav a nav a:visited, will style the anchor when it is visited, as well as when it is not visited. If you just use nav a:visited you will style the visited link but not the not-visited link. Using nav a nav a:visited allows you to write the same styling for the anchor element in both "states".
I hope that helps. (And I hope it is correct) :P