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 trialardagermiyanoglu
11,428 Points::before and ::after pseudo-element usage?
3 Answers
mikes02
Courses Plus Student 16,968 PointsFor challenge 3 it asks "Next, in the second .progbar selector, add the pseudo-element that will insert content before the element. Don't forget to write the content declaration on line 13." So with that you want to add the ::before pseudo-element to .progbar as demonstrated below, and then it is asking you to duplicate the step from the previous challenge question for inserting content using content: "".
.progbar::before {
content: "";
display: block;
width: 24px;
height: 24px;
border-radius: 50%;
position: absolute;
left: 49%;
top: -9px;
background-color: #7dd898;
}
For challenge 4 it's wanting you to insert the HREF value after every anchor link, so again we are going to use ::after but this time in content we are going to look for the href attribute specifically, to do that we can use attr(href) as demonstrated below:
a::after {
content: attr(href);
}
Ryan Moody
20,499 PointsYou need to use the ":before"
Alexey Tseitlin
5,866 PointsYou need to use pseudo-element ":after"
Hope that helps)
mikes02
Courses Plus Student 16,968 Pointsmikes02
Courses Plus Student 16,968 PointsHello, in future posts I would encourage you to please share the code that you have so far so that other members can help effectively troubleshoot it. To help out, I have edited the title of your post to be more descriptive, this will help others who may be facing the same challenge.