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 Backgrounds and Borders Advanced Backgrounds

David Vazquez
David Vazquez
3,842 Points

Advanced Backgrounds: Preview is correct but there's still an error!

Hello! The preview in this challenge shows everything as it should be rendered, but the editor still marks an error. Is there anything wrong with my code?

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

Thank you!

2 Answers

Erik McClintock
Erik McClintock
45,783 Points

David,

The reason your code isn't working is that the order of the two new images ('pencil' and 'smiley') are backwards.

The challenge states that you need to have the 'smiley.png' on top of the 'texture.jpg', and then the 'pencil.png' on top of the 'smiley.png'. Thus, the order you want your images listed is 'pencil.png', 'smiley.png', 'texture.jpg'.

If you switch those around (making sure to switch the appropriate positioning and retaining correct comma placement!), you should be good to go.

Erik

Christian Nkoy
Christian Nkoy
4,308 Points

Hi David! Make sure that the background image that is on top comes before the one that is beneath in your syntax. E.g. if image1.jpg were to be on top of image2.jpg and image2.jpg were to be on top of image3.jpg, your syntax would look like:

background: url('image1.jpg'), url('image2.jpg'), url('image3.jpg');