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

Christopher Castellanos
Christopher Castellanos
432 Points

List-Style not being applied and icons not being displayed.

I can't seem to find where in the code I may be going wrong but it seems some path or syntax might not be working correctly. Some fresh eyes would be of great help.

https://w.trhou.se/ogfw89p0cr

Can you post your code here?

Christopher Castellanos
Christopher Castellanos
432 Points

HTML: <section> <h3>Contact Details</h3> <ul class="contact-info"></ul> <li class="phone"><a href="tel:786-282-6494">786.282.6494</a></li> <li class="mail"><a href="mailto:seecast@gmail.com">SeeCast@GMail.com</a></li> <li class="facebook"><a href="http://facebook.com/SamCastTraining">SamCast Training</a></li> </section>

CSS:

.contact-info { list-style: none; padding: 0; margin: 0; font-size: 0.9em; }

.contact-info a { display: block; min-height: 20px; background-repeat: no-repeat; background-size: 20px 20px; padding: 0 0 0 30px; margin: 0 0 10px; }

.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.facebook a { background-image: url('../img/facebook.png') }

4 Answers

Jennifer James
Jennifer James
6,430 Points

funny how I can see the error in your code, and not my own, which is exactly the same... anyway this fixed mine....

your closing <ul> tag is in the wrong place - it should be at the end of your list items

  <ul class="contact-info"></ul>

I made this exact same mistake today and it drove me absolutely nuts for about 20 full minutes!

It looks like you are missing the semi-colons after your URLs.

Christopher Castellanos
Christopher Castellanos
432 Points

Good eye! I did fix the semi-colons but I'm still not seeing any changes in the list-style or seeing an icons being placed. I hope linking the Snapshot helps a little more to see the whole picture. https://w.trhou.se/q7fdgvvapa

Thank you! It does help quite a bit to include the Snapshot. What page are you seeing these errors with? I can view the code, but I can't see exactly what it looks like. From what I can tell, it looks like it should be working.

Jennifer James
Jennifer James
6,430 Points

Hi, as I said above,,, on line 32 of contact.html, your closing ul tag is in the wrong place, it should be at the end of the list :)

 <ul class="contact-info"></ul>
          <li class="phone"><a href="tel:786-282-6494">786.282.6494</a></li>
          <li class="mail"><a href="mailto:seecast@gmail.com">SeeCast@GMail.com</a></li>
          <li class="facebook"><a href="http://facebook.com/SamCastTraining">SamCast Training</a></li>
      </section>

should read

 <ul class="contact-info">
          <li class="phone"><a href="tel:786-282-6494">786.282.6494</a></li>
          <li class="mail"><a href="mailto:seecast@gmail.com">SeeCast@GMail.com</a></li>
          <li class="facebook"><a href="http://facebook.com/SamCastTraining">SamCast Training</a></li>
</ul>
      </section>

hth