Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS

Issue with CSS Advanced Backgrounds code challenge

Question

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.

Error:

Bummer! Check the background image values in your CSS.

Answer:

/* Complete the challenge by writing CSS below */
.sketch {
  background: url('img/pencil.png') no-repeat left bottom; url('img/smiley.png') no-repeat right top, url('img/texture.jpg') #EED293;
}

3 Answers

James Barnett
James Barnett
39,199 Points

edward diamond -

You've got a semicolon in the middle of your CSS, turning it into one valid CSS rule and one invalid CSS rule. Remove the semicolon and you'll be all set.

Spen Taylor
Spen Taylor
13,027 Points

Ahh too right! I got it the wrong way around, oops!

Thanks, I think I had been looking at my screen too long and totally overlooked the incorrect semicolon !

James Barnett
James Barnett
39,199 Points

I had a programming teacher that used to like to say half of all troubleshooting issues can be solved by going to lunch.

Spen Taylor
Spen Taylor
13,027 Points

Check your semi colons, seems you've typed a comma instead :P

Edit: ignore my comment, maybe I shouldn't try answering posts first thing in the morning!