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

PHP

Help with icons and path

Helo,

I started out with a basic HTML frontpage named index.html. I made it a php where i included the footer and header.

But it seems like av have some issues with my paths when i want to show an icon because it doesnt show in browser. here's my code:

<a href="https://www.facebook.com/kimrunar"><img src='/icons/facebook-wrap.png' alt="Facebook Logo" class="social-icon"></a>

this is to be shown in my footer, and the footers directory is (inc/footer.php). As i said, this worked fine on my HTML. what's wrong?

5 Answers

Is this a local project on your computer?

uhm.. how do i paste a code and show on forum?

nevermind. Got it:) still need help with the code though

no, i've uploaded it to my web-host. Everything seems to work besides that icon..

Can you give me a link so i could investigate for you?

Funny, i figured it out! i needed to add the folder in my root-directory. Stupid mistake really. Thanks anyway :)