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

Does someone understand why this code is not accepted to pass the challenge in Advanced Backgrounds ?

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

5 Answers

Omar Gaizi Your code is valid and works in the browser, but I think the Code Challenge only accepts the shorthand property

It should work because it's valid...

It said something like : "bummer ! check your position value in CSS" : /

maybe it has to do with background shorthand property that doesn't allow to use background-position property on top of it ?

This works:

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

thks Philip, I used the same code to pass the challenge, but I'm still wondering why the first one is not valid : /