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 trialKate Woodroffe
Courses Plus Student 6,685 PointsWhy is there only one colon before 'after'?
In the example the css written is .group:after{ but in other areas of the course two colons are used to signify a pseudo-element. I tested it and one colon still works. Which is correct one colon or two?
1 Answer
Steven Parker
231,236 PointsTwo colons is the correct form for a psuedo-element (one colon for a psuedo-class). At one time, both used a single colon and browsers still accept that form. The single colon in the example was probably an instructor's typo, but since it caused no error it slipped by.
If you want, you could report it as a bug as described on the Support page.
Kate Woodroffe
Courses Plus Student 6,685 PointsKate Woodroffe
Courses Plus Student 6,685 PointsThank you for clearing that up :)