Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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