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 (Deep Dive) Backgrounds and Borders: Background Properties (Code Challenge Question 2 of 3)

Having a tough time with this deep dive code challenge. In need of some assistance.

Question: 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.

My Code:

.box {
  background-color: #387ABC;
  background-image: url("mike.png");
  background-repeat: no-repeat;
}

Thanks for the help in advance.

Nevermind I figured it out. Just needed to add img/ to the mike.png

You can do no-repeat in the background shorthand, like this:

background: url('img/mike.png') no-repeat and where you want to position it here;

Just thought that I'd tell you that.

1 Answer

Hey Eric,

Looks like you need to go into the 'images' folder, then call the image :)

Just figured out my mistake. Thanks anyways bro!

No worries, happy learning!