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

Check Background-Image value in your CSS

Challenge Task 2 Error: Check your Background-Image value in your CSS?

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

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
/* Complete the challenge by writing CSS below */

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

2 Answers

Ryan Field
PLUS
Ryan Field
Courses Plus Student 21,242 Points

For the background-image property, your backslash (\) should be a forward slash (/), like this:

background-image: url('img/mike.png');

I am guessing this because the syntax is specifying url? should it really be a big deal?