Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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?