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 CSS Foundations Selectors Link and User Action Pseudo-Classes

I thought a:active was supposed to come AFTER a:hover? Guil places it BEFORE. It still works, though. Just wondering why

Guil didn't go into why he specifically placed a:active where he did, but I was wondering why. Is there a reason? Do we need to follow a certain sequence?

1 Answer

Logically, you might be correct, but there is no reason to specify the order of the pseudo classes that I know of.

It's always a good idea to keep them in sequence of the experience on the user's end. this is just an opinion though.

:link :hover :active :visited

Hope this helps

Thanks Ali