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 trialKirt Perez
7,374 PointsWorkspace buggy. The preview using the visited pseudo class doesn't work properly
Using:
main a:visited { color: red; }
When you save your code and click the preview button, the page has the links in the visited state. Reloading the page doesn't reset the links, it still stays at the visited style, in this case red even though I haven't clicked on the links myself.
1 Answer
Jennifer Nordell
Treehouse TeacherHi there, Kirt Perez! I'm sure you've done a Google search at some point and clicked a link, then gone back later and done the same search and the link you previously visited is still marked in a purplish color because you've already visited it. This is a feature of the browser and its history. Workspaces is really only a text editor in this case and your code is being loaded into your browser.
Your browser knows that you've visited that link before, and so refreshing the page will have no effect on its status as already having been visited. You would need to clear your browser's cache/history for it to go back to an "unvisited" state.
Hope this helps!