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 trialAlex Vargas
1,416 PointsHaving a hard time with :visited class
Every time I click on any of the links within main, the page will do some kind of reload and all links will trigger :visited, so I have to delete all browser records but the same issue keeps happening. Here is the code inputted to treehouse's workspace.
main a:link { color: green; }
main a:visited { color: #58FA58; }
main a:hover { color: yellow; }
main a:active { color: purple; }
1 Answer
Steven Parker
231,275 PointsThat all sounds normal, if all the links point to the current page. So selecting any one of them causes the browser to reload the page and then consider the URL (which they all share) as "visited".
If you change the HTML to give them different "href" values, those should not become "visited".
Alex Vargas
1,416 PointsAlex Vargas
1,416 PointsThat makes sense, I'll try that. Thank u so much