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

Last code challenge of CSS Selectors issue

I am slightly stuck in the last code challenge of the css selectors' course (challenge 2/4).

"Challenge Task 2 of 4

In the same rule, add the property that lets us insert content into an element. The value should be an empty set of quotes."

I've been trying the last couple of days and also watch the last videos again but I can't really figure out the answer.

Can someone give me a hand?

Thanks

can you provide link to the challenge?

1 Answer

I think I know which challenge you're referring to. You need to use the content property here.

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

Ah... ok! For reason I thought I needed to add 'attr'. So I kept writing 'content: attr();' and just didn't work.

Good stuff. Thank you William!