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!
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
Jack Graham689 Points
Why doesn't my coding on Treehouse work in "preview?" I am just adding images!
I am just adding image tags within the footer tags in the "Front End Web Design" module of the TreeHouse course I am taking, for college credit at Long Beach City College in CA. But I add the tags and it doesn't work! The tags I add are as follows: <img src="facebook-wrap.png" alt="facebook logo"> and <img src="twitter-wrap.png" alt="twitter logo"> Simple enough, right? Well, I have tried working with this about 10 times now. At first I got the "bummer" message, and yet when I hit preview I saw the facebook and twitter logos where they should be. Now I only see broken image icons, and the "alt" attribute does not say "facebook logo" or "twitter logo." Also, I am getting a different result each time I do this exercise, and I do it the same way each time, and it previews differently now! What am I to do?
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Nick Pettit</title> </head> <body> <header> <a href="index.html"> <h1>Nick Pettit</h1> <h2>Designer</h2> </a> <nav> <ul> <li><a href="index.html">Portfolio</a></li> <li><a href="about.html">About</a></li> <li><a href="contact.html">Contact</a></li> </ul> </nav> </header> <section> <ul> <li> <img src="img/numbers-01.jpg" alt=""> </li> <li> <img src="img/numbers-02.jpg" alt=""> </li> <li> <img src="img/numbers-06.jpg" alt=""> </li> </ul> </section> <footer> <img src="facebook-wrap.png" alt="Facebook logo"> <img src="twitter-wrap.png" alt="Twitter logo"> <p>© 2013 Nick Pettit.</p> </footer> </body> </html>
Ayoub AIT IKEN12,314 Points
if your imgs are in a folder called " img " then you sould put it in the url like this :
<footer> <img src="img/facebook-wrap.png" alt="Facebook logo"> <img src="img/twitter-wrap.png" alt="Twitter logo"> <p>© 2013 Nick Pettit.</p> </footer>
Jack Graham689 Points