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 trialyara el sabeh
Courses Plus Student 7,395 Pointscreate a new rule that will insert a pseudo-element after an a element.
it keeps on saying Let's use the double colon syntax for pseudo-elements
please any help
/* Complete the challenge by writing CSS below */
.progbar {
display: block;
width: 50%;
height: 100%;
border-radius: inherit;
background-color: #5ece7f;
}
.progbar {
display: block;
width: 24px;
height: 24px;
border-radius: 50%;
position: absolute;
left: 49%;
top: -9px;
background-color: #7dd898;
}
.progbar {
height: 6px;
border-radius: 3px;
background: #d6d7d9;
position: relative;
margin-bottom: 3.875em;
}
.progbar::after {
display: block;
width: 50%;
height: 100%;
border-radius: inherit;
background-color: #5ece7f;
}
a:after {
content: " " attr(href) "";
}
.progbar::before {
content: "";
display: block;
width: 24px;
height: 24px;
border-radius: 50%;
position: absolute;
left: 49%;
top: -9px;
background-color: #7dd898;
}
a:after {
content: " " attr(href) "";
}
<!DOCTYPE html>
<html>
<head>
<title>Selectors</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="page.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="progbar"></div>
<a href="http://teamtreehouse.com">Check out the URL: </a>
</body>
</html>
1 Answer
Jeremiah Bushau
24,061 PointsYou have to read the instructions of these quizes very carefully, it wants you to modify the existing selectors. The a::after is the only one you have to create for yourself. Also, in the a::after selector the quotes in the value of your content property are not needed just the function. Fix the quotes and the syntax of your pseudo elements and you'll be good to go. Here is an example.
.progbar::after {
content: "";
display: block;
width: 50%;
height: 100%;
border-radius: inherit;
background-color: #5ece7f;
}
.progbar::before {
content: "";
display: block;
width: 24px;
height: 24px;
border-radius: 50%;
position: absolute;
left: 49%;
top: -9px;
background-color: #7dd898;
}
.progbar {
height: 6px;
border-radius: 3px;
background: #d6d7d9;
position: relative;
margin-bottom: 3.875em;
}
a::after {
content: attr(href);
}
yara el sabeh
Courses Plus Student 7,395 Pointsyara el sabeh
Courses Plus Student 7,395 PointsThank you :)