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?