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

Is there a way I can target only specific links using the pseudo classes?

Say, I want only a specific link to hover and not all.

2 Answers

Nicholas Grenwalt
Nicholas Grenwalt
46,626 Points

You could chain 2 pseudo selectors together, like a:hover:nth-of-type(n). n being the number of whatever particular item you would like to have highlighted. I'd recommend just giving the particular item an id or class of its own and then just targeting it that way though. It makes your code a lot less fragile to future modifications.

Thank you.. You are my GURU!! :)