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 Build the Contact Page

Amil Boddie-Willis
Amil Boddie-Willis
9,661 Points

Adding Facebook to My Contact-Info Page On My Website...

I'm having trouble figuring out how to add my Facebook page to my contact-info - My name comes up, but not the, actual, image - I could use some help with that - Here's the code I'm using:

This one is from my CSS file:

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

AND

This one is from my contact.html file:

<li class="facebook"><a href="http://facebook.com/intent/facebook?screen_name=Amil">Amil</a></li>

4 Answers

Kasim Khan
Kasim Khan
4,925 Points

your code seems correct, I think the url to the image may be the problem.

jase richards
jase richards
10,379 Points

Try removing the ../ in the URL link.

  1. Make sure the image path is correct. The one you are currently using has a reference "one level up" (or the top level) from the page it is currently on.

  2. You are missing a space after li - It might get interpreted it as one word, instead of li .facebook. If it's still not working, try shortening down on the specifier, for example having just li .facebook, or even just .facebook.

Amil Boddie-Willis
Amil Boddie-Willis
9,661 Points

Thanks everyone - I think I have it figured out, well enough - The, only, weird thing is that when I click on the Facebook icon it goes to a Garrett Smith's Facebook page, instead of my own - That won't stop people from getting to my Facebook page, necessarily, I guess, but that's, just, weird...