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 trialJoshua Kanui-Rowe
1,894 PointsWhy dose have to put "nav a, nav a" twice to make it stay white when "visited"?
I am confused why we have to put "nav a, nav a" twice to make it stay white in the code "nav a. nav a.visited"?
1 Answer
ve
5,048 PointsIf you'd just write 'nav a.visited' you would only style the links you visited, and not the links in general. So if you haven't visited a link yet, the styling doesn't apply to it and you'll get the default styling. By selecting "nav a, nav a.visited" you select a) Links in the <nav> section in general and b) Links in the <nav> section that were already visited.