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 trialCraig Kempster
3,929 PointsCheck 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; }
<!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>
/* 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
Courses Plus Student 21,242 PointsFor the background-image property, your backslash (\) should be a forward slash (/), like this:
background-image: url('img/mike.png');
Craig Kempster
3,929 PointsI am guessing this because the syntax is specifying url? should it really be a big deal?