CSS CSS Selectors Advanced Selectors Pseudo-Elements Challenge

Front End Web Development Techdegree Student 6,794 Points

it is CSS Selectors' Pseudo challenge 4th question. I create attr() into content and inserted href's value.

.progbar a::after { content: attr(href); display: block; width: 50%; height: 100%; }

/* Complete the challenge by writing CSS below */

.progbar a::after {
  content: attr(href);
  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; 
<!DOCTYPE html>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="page.css">
  <link rel="stylesheet" href="style.css">
    <div class="progbar"></div> 
    <a href="http://teamtreehouse.com">Check out the URL: </a>

2 Answers

Heidi Fryzell
.a{fill-rule:evenodd;}techdegree seal-36
Heidi Fryzell
Front End Web Development Treehouse Moderator 21,229 Points

Hello. Your code is correct. You just need to put it on the third CSS selector. The challenge starts having you modify the first selector then the second, then the third. You overwrote what you did on the first selector when you should have placed it on the third selector. It might be easier to start from question one on the challenge and re-submit.

Steven Parker
Steven Parker
203,731 Points

There's an issue in the task 1/2 code, the selector shouldn't have the "a" and the "content" should be empty.

The rule that gets the "a" and the special content for task 4 is the last one.