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 trialDarren Kynaston
Courses Plus Student 15,610 PointsCode not accepting
Next, add the image 'mike.png' located inside the 'img' folder to the background. We only want Mike to appear once, so follow it with a property and value that will not repeat the image.
I have added the following css code:
.box { background-image: url('img/mike.png'); }
BUT the task is telling me that the code is wrong.
1 Answer
Rand Seay
13,975 PointsFrom what I understand, you still need the hex color value from the first step in the challenge. It is possible to use the same background:
property from that step, just add the url after the color. The second part of the instructions specifies that the image should only appear once, meaning no-repeat
needs to be included as well. This code passed the challenge when I tried it just now:
.box {
background: #387ABC url('img/mike.png') no-repeat;
}