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 CSS Selectors Advanced Selectors Pseudo-Elements - ::before and ::after

AR Ehsan
AR Ehsan
7,912 Points

Why does Guil use two colons for after and before.

I don't get it

2 Answers

AR Ehsan
AR Ehsan
7,912 Points

Thanks, but can you help me with Challenge Task 4 of 4

Finally, create a new rule that will insert a pseudo-element after an a element. As the content value, define a CSS function that will insert an href attribute's value as content. In html. Thanks!

This should be helpful:

https://css-tricks.com/almanac/selectors/a/after-and-before/

Summarized, two colons is for inserting content and one is for :last-child, :nth-child() and other child selectors.

AR Ehsan
AR Ehsan
7,912 Points

Thanks, but can you help me with Challenge Task 4 of 4

Finally, create a new rule that will insert a pseudo-element after an a element. As the content value, define a CSS function that will insert an href attribute's value as content. In html. Thanks!

Ghost code answered this already