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

Code Challenge - Advanced Backgrounds

I have no idea why my code doesn't validate correctly. The result of my code looks correct, but it keeps saying, "Bummer! Check the position values in your CSS."

"Add the image 'smiley.png' located in the 'img' folder above the texture background. Set it so that it doesn't repeat, and position it in the top-right corner of the div. Then, add 'img/pencil.png' above the smiley image layer. Set it so that it doesn't repeat, and position it in the bottom-left corner."

.sketch { background: url('img/pencil.png') no-repeat left bottom, 
url('img/smiley.png') no-repeat right top, 
url('img/texture.jpg'); }

I know it doesn't ask for the texture image, but I noticed if I don't include that, the texture disappears... Can someone help me, please? This is the last thing I need to do to get my badge! :) Thanks!

4 Answers

Chase Lee
Chase Lee
29,275 Points

Actualy you need to leave #EED293 right after:

url('img/texture.jpg')

Like this:

url('img/texture.jpg') #EED293

OMG I had tried #d6bb80 (like in the video before the challenge), but it didn't work. Where did you get that hex value?! That worked! THANK YOU! :)

Chase Lee
Chase Lee
29,275 Points

The value is there when you start the code challenge.

Wow, I've actually been using style tags in the head to complete these challenges because I never noticed that 'styles.css' tab... I feel really dumb. haha THANK YOU. :)

Chase Lee
Chase Lee
29,275 Points

Haha. Don't sweat. That happened to me before even though I knew about the tabs.

Chase Lee
Chase Lee
29,275 Points

Try top right and bottom left instead of right top and left bottom. I believe it is a problem with the ordering of the values.

Yeah I initially thought that as well and tried that, but it still says to check my position values. :( Thanks though!

Chase Lee
Chase Lee
29,275 Points

Try using .png instead of .jpg in:

texture.jpg

When I change it to a png, it disappears...

I have the same problem all the response is bad!!!