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 trialZach Kamp
5,259 PointsContact icons not appearing.
Here is my markup:
<ul class="contact-info">
<li class="phone"><a href="tel:555-6425">555-6425</a></li>
</ul>
And here is my CSS:
.contact-info li.phone a {
background-image: url('../img.phone.png');
}
Yet no icon is appearing. What am I missing?
Zach Kamp
5,259 PointsOk, cool. Thanks a lot!
1 Answer
Mick Reilly
10,752 PointsHi, Zach
The url value of the background-image property is invalid:
.contact-info li.phone a {
background-image: url('../img.phone.png');
}
As img is a directory, it requires a forward slash (/) after it instead of a period (.).
.contact-info li.phone a {
background-image: url('../img/phone.png');
}
Hope this helps.
Mick
Zach Kamp
5,259 PointsBah! So simple. Thanks for the fresh pair of eyes Mick!
Greg Kaleka
39,021 PointsGreg Kaleka
39,021 PointsHi Zach - I cleaned up your code a bit. For future reference, you can surround your code with back-tics like this to get it to look beter:
Here's my HTML:
```HTML
[html code here]
```
And here's my CSS:
```CSS
[css code here]
```