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

HTML How to Make a Website Adding Pages to a Website Add Iconography

Akhil Kumar
Akhil Kumar
625 Points

Icons not showing up ..

Okay, so 2 others have asked this question but none of them have a conclusive answer .. So, the problem is that none of the icons are appearing , here is my css:

.contact-info li.phone a {
  background-image: url ('../img/phone.png');
}

.contact-info li.mail a {
  background-image: url ('../img/mail.png');
}

.contact-info li.twitter a {
  background-image: url ('../img/twitter.png');
}

The file structure is the same as that of Nick's :) I assume there is nothing wrong with the html part of the code, Any help would be appreciated, Thanks, Akhil

Akhil Kumar
Akhil Kumar
625 Points

html :

<section>
        <h3>Contact Details</h3>
        <ul class = "contact-info">
            <li class = "phone"><a href = "tel:123">123</a></li>
            <li class = "email"><a href = "mailto:bob@example.com">bob@example.com</a></li>
            <li class = "twitter"><a href = "http://twitter.com/intent/tweet?screen_name=potato">@potato</a></li>
        </ul>
      </section>

1 Answer

Denis Arambasic
Denis Arambasic
3,184 Points

No space between url and ( :

url ('../img/phone.png')

use it so in your css:

url('../img/phone.png')

Akhil Kumar
Akhil Kumar
625 Points

Thanks a bunch! That seemed to do the job! although i dont quite get why, shouldnt spaces not be a problem?