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 trialrobertgrieggran
1,576 Pointsfull stop or colon in CSS .selected vs :hover
Very simple question! Why does the .selected psuedo-class use a full stop whereas the :visited and :hover selectors use colons? thanks very much, rob
3 Answers
James Barnett
39,199 PointsA class is selected with a .
http://reference.sitepoint.com/css/classselector
A pseudo-class begins with a :
Dave McFarland
Treehouse TeacherIn this video, .selected isn's a pseudo-class, it's a regular class selector that's been applied to one of the links on the index.html page.
But, there is a ::selection
pseudo-element (thanks James Barnett) that applies when content on a page is selected by a user: https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-elements
James Barnett
39,199 Points:selected
isn't listed on the mdn page you linked.
However there is a pseudo-element ::selection
https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-elements
robertgrieggran
1,576 Pointsgot it thanks vm