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 Foundations Values and Units Numeric and Textual Data Types

CSS stage 4 challenge problem

This is my instruction:

"Using a percentage, set the paragraph to half of its current width."

This is my code:

p {
  width: 50%;
}

And this is the result:

"Bummer! Check the length unit in your CSS value"

So what am I missing? My selector is a paragraph, my property is width, and my value is the requested length unit! I'm probably missing something really simple, so let me down gently, please... :)

1 Answer

Never mind; I poked around on the forums, and found out that the problem was with the PREVIOUS task; I should have used background-image, rather than content.

However, it seems odd to me that it let me past that task just fine, and only stopped me when I went on to a different rule! Weird..