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

CSS code not working

Im doing the contact page in the HTML tutorial and im stuck with some problems

Here is my code in CSS

.contact-info {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size-adjust: 0.9em;
}
.contact-info li.phone a {
  background-image: url('../img/phone.png');
}

and Here is my code in HTML

 <h3>Contact details</h3>
         <ul class="contact-info">
         <li class="phone"><a href="Tel:809988-1474">809-988-1474</a></li>
         <li class="mail"><a href="mailto:jsanchez@dawgroup.net">jsanchez@dawgroup.net</a></li>
         </ul>

im trying to add the phone pic but is not working

Hi,

I've just updated your question so the HTML and CSS is a little easier to read.

-Rich

1 Answer

Hi,

Using CodePen I can see that your code appears to work fine in terms of displaying the image. I changed the URL and it appeared straight away so it seems like the image isn't in the location specified.

You may just need to check the URL in this line:

  background-image: url('../img/phone.png');

This means that your img folder is up one level from your style sheet and the phone.png is within that folder. Is this correct?

-Rich