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

a:visited doesn't work.

Here is the task (commented out) and then my code:

/* Create visited and hover styles for all links inside 'main' */

main a:visited { color: lightcoral; }

main a:hover { color: orange; text-decoration: none; }

In this order only the a:hover works. If I change the order (which is wrong to do I have learned) only the a:visited works. Would be happy for some help with this!

1 Answer

Steven Parker
Steven Parker
231,007 Points

You have the order correct. Try reloading the page after you've visited the link. Also check the code just before this, an error in a previous rule might cause the next one to be skipped.

If that doesn't resolve it, make a snapshot of your workspace and post the link to it here so we can replicate the issue.

Thank you for your quick reply Steven. I have reloaded the page many times and tried to re-open the workspace, but it still does not work...?

Oh yes! It was an extra curly brace in the code above it - thank you!