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 trialEdward Bryan Kene Morales
7,374 PointsWhat the difference between .group:after and .group::after
So I am just curious why Guil is using .group::after in the video. This css is used in the video to clear the floats.
I am just curious because HTML5 Boilerplate uses .clearfix:after, please note that one ":" is only used.
Can somebody please shed me some light on this? Thanks! Will really appreciate it.
1 Answer
Parker Byrd
Courses Plus Student 17,716 PointsThe ::after notation was introduced in CSS 3 in order to establish a discrimination between pseudo-classes and pseudo-elements. Browsers also accept the notation :after introduced in CSS 2. Before and After are pseudo-elements whereas something like :nth-of-type is a pseudo-class. Hope that helps!
Edward Bryan Kene Morales
7,374 PointsEdward Bryan Kene Morales
7,374 PointsThanks Parker! Now it's clear for me :) Cheers!