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 trialMichael Joyce
8,253 PointsCode Challenge Bug - Challenge Task 2 of 3
Add marker.png located inside the img folder as a background image to the list items.
The following CSS passes the check even though it is clearly incorrect.
ul {
background: url(img/marker.png) no-repeat;
}
Michael Joyce
8,253 PointsThe syntax is not incorrect. The fact that it passes the code challenge check is incorrect. It will add a background image to the list itself, not the list items.
The correct CSS to add a background image to the list items would be :
li {
background: url(img/marker.png) no-repeat;
}
or
li {
background-image: url(img/marker.png);
background-repeat: no-repeat;
}
or
ul {
list-style-image: url(img/marker.png);
}
Jason Anello
Courses Plus Student 94,610 PointsHi Michael,
You should email support about this.
2 Answers
Felix Yakubov
17,475 PointsIts incorrect, there's no ' '
ul {
background: url('img/marker.png') no-repeat 0 2px;
}
Michael Joyce
8,253 PointsQuotes are optional.
I'm not looking for help with solving the code challenge. Just pointing out that the CSS code in my original post should not pass the check as it is incorrect.
tihomirvelev
14,109 Pointstihomirvelev
14,109 PointsWhy do you think the syntax is incorrect?