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

The Box Model : Floats with Pseudo Elements.

Hi guys I'm currently watching the 'Floats' video within the 'Box Model' section. At 8:29, Guil goes onto explaining using 'clearfix' with Pseudo elements which is fine.

But in the previous video on Pseudp Elements we are told specifically to use two colons:: for each 'before/after' etc, yet he is only using one colon: in this video. Can you help?

Cheers Dan:)

James Barnett
James Barnett
39,199 Points

Tagging Guil Hernandez to get his thoughts on this

1 Answer

Guil Hernandez
STAFF
Guil Hernandez
Treehouse Teacher

Hey everyone,

Both work exactly the same way. The 2 colon syntax simply sets them apart from pseudo-classes. The main difference is that IE8 does not support the two colons––just the one.

Guil your hand gestures into moving me on through the videos was cracking me up today in the CSS episodes- just wanted to say- you are such a great teacher! The rainbow gesture was a nice touch on the color episode..lol! I love this! Thank you guys for teaching, what before has seemed to be such a programmers secret. I LOVE treehouse! Thanks so much for teaching me!

Guil Hernandez
Guil Hernandez
Treehouse Teacher

Thanks Deanna Morale! I'm glad to hear that you're enjoying the CSS videos.

Thanks so much for learning with Treehouse!