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 Challenge

I am stuck here. Not sure what I am doing wrong. I added the before pseudo class and the content property but cant pass/

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.

style.css
/* Complete the challenge by writing CSS below */

.progbar::after {
  display: block;
  width: 50%;
  height: 100%;
  border-radius: inherit;
    background-color: #5ece7f; 
  content: "";

}

.progbar::before {
    display: block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    position: absolute;
    left: 49%;
    top: -9px;
    background-color: #7dd898; 
  content: " ";
}

.progbar {
  height: 6px;
  border-radius: 3px;
  background: #d6d7d9;
  position: relative;
  margin-bottom: 3.875em; 
}
index.html
<!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>

2 Answers

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there! In the instructions of task 3 of 4 it explicitly states that the content property must be defined on line 13. It is there that the checker is looking for your task progress completion. If I paste in your code and then move the second rule up one line, I can then place the content rule on line 13. When I do this, your code passes!

:bulb: Challenges are very strict and instructions must be followed to the letter. Even if your code is functional outside the challenge, the challenge can fail if it does not meet the specified requirements.

Hope this helps! :sparkles:

Todd Anderson
Todd Anderson
4,260 Points

Don't FORGET to put the content: ""; at line thirteen. :)