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 trialCharith Perera
101 PointsWhat's Wrong With This?
Can't see why this code won't pass:
background: url('img/smiley.png') no-repeat right top, url('img/pencil.png') no-repeat left bottom, url('img/texture.jpg') #EED293;
3 Answers
Christian Frick
14,586 PointsHere's my solution
.sketch {
background: url('img/pencil.png') no-repeat bottom left, url('img/smiley.png') no-repeat top right, url('img/texture.jpg') #EED293;
}
Thanks for the correction Jason... So I think the order of the images isn't correct ;)
Jason Anello
Courses Plus Student 94,610 PointsHi Christian,
In the case of using 2 keywords the order doesn't matter because the browser knows which is horizontal and vertical based on the keyword name.
The expected order though is horizontal positioning first so if you use lengths or percentages like 20px 50px
the first one is going to be used for horizontal positioning.
I would recommend sticking to the order of left bottom
and right top
so that you can condition your brain to remember the order.
Jason Anello
Courses Plus Student 94,610 PointsHi Charith,
All your values are correct. The only problem is your layering order. The pencil image needs to be on top of the smiley image so the pencil image should be first in the list
background: url('img/pencil.png') no-repeat left bottom, url('img/smiley.png') no-repeat right top, url('img/texture.jpg') #EED293;
```.
Christian Frick
14,586 PointsChristian Frick
14,586 PointsPast please the whole CSS-File