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 Background Properties

i don't know what to do

i forget how to do this thing... "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."

index.html
<!DOCTYPE html>
<html>
<head>
    <title>Background Properties</title>
    <link rel="stylesheet" href="page.css">
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <div class="box"></div>
</body>
</html>
style.css
.box {
background-color: #387ABC;
background-repeat: repeat;  
  background-image:
}

3 Answers

Olga Kireeva
Olga Kireeva
9,609 Points

I would also like to add that depending on the css file location the url can look like this: url('../img/mike.png'). In other words, you should check where files are located.

background-image: url ("img/mike.png"); background-repeat: no-repeat;

This first issue you need to correct is the task is not to repeat the image so you need to the no-repeat value so the image will not repeat, then you need to url value with the file path to the image you are trying to link to.

.box {
background-image: url('img/mike.png');
    background-repeat: no-repeat;
}