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 trialStormy Silver
9,240 PointsHelp Please!!
I am in Values and Units at Numeric and textual Data Types. I am on challenge task 3 of 3. i cant get it.
Its asking me to: Using a percentage, set the paragraph to half of its current width.
I put: p { width: 50%; }
It was it is wrong even though this is what it shows to do in the video.
please help!?
6 Answers
Jeff Busch
19,287 PointsHi Stormy,
There is no id or class called content in the html so I don't understand what that is for. The error messages in the code challenges sometimes fall a little short of describing what the actual problem is; not unlike Microsoft's error messages, ha ha ha. This can make it difficult to continue on. Here is the code you need.
Jeff
strong {
color: initial;
}
.wrapper {
background-image:url("img/bg.jpg");
}
p {
width: 50%;
}
Gabriel Morin Moisan
7,348 PointsI think maybe you were not specific enough in your targeting of that paragraph try :
.wrapper p {
width:50%;
}
seems to be working for me
Gabriel Morin Moisan
7,348 PointsJust tried it with just
p {
width: 50%;
}
and it worked for me though so I am not sure what you did wrong did you delete your previous code. Because I think they check for the previous step each time.
Stormy Silver
9,240 PointsThat also didn't work....
Gabriel Morin Moisan
7,348 PointsCould you paste all the code you wrote on that challenge it may help to target the problem ;).
Stormy Silver
9,240 PointsIt say to check the length unit in my CSS value. Is what i did wrong.
Stormy Silver
9,240 Pointsstrong { color: initial; } .wrapper { content: url(img/bg.jpg); } p { width: 50%; } <<and that is wrong
Gabriel Morin Moisan
7,348 PointsI am not sure why your using the content property to set the background but i just passed the challenge just by changing that property to background.
Gabriel Morin Moisan
7,348 PointsUsing content seems to be erasing the actual paragraph and the div didnt have the same height thats probably why you were not able to pass the challenge.
Gabriel Morin Moisan
7,348 PointsGabriel Morin Moisan
7,348 PointsThat code will definitely work but just to specify he didnt use content has a selector. But has a way to had the background img.
Gabriel Morin Moisan
7,348 PointsGabriel Morin Moisan
7,348 Points*add
Stormy Silver
9,240 PointsStormy Silver
9,240 PointsThank you so much this is exactly what i needed, it worked. thank you again!