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 trialMads Valentin-Pedersen
997 PointsCan't get facebook picture to show
I can't get the facebook picture to show. my code is like this:
img scr="Img/facebook-wrap.png" alt="Facebook logo" class="socal-icon"
And the folder with the images is with capital I + "Img"
(code is without <> because other wise it would not show the line of code)
Mads Valentin-Pedersen
997 Pointsi do not se any of that happen: just get a little box up that says "img 0px 0px"
Robert Mehew
2,427 PointsIf you click on the img element and look on the right (in google inspector) is there any CSS assigned to it, which has things like width: 0px; or height:0px. It looks like your image has no height or width.
1 Answer
John Breslin
16,963 PointsIt's "img src," not "scr."
Mads Valentin-Pedersen
997 PointsThank you very much.
Robert Mehew
2,427 PointsWow I didn't even see that, my bad.
John Breslin
16,963 PointsNo prob.
Robert Mehew
2,427 PointsRobert Mehew
2,427 PointsUsually the only real reason I haven't had images loaded is because the SRC is incorrect, either through misspelling of the image name or that the path doesn't actually lead to the image.
If you have google chrome installed, open it up and navigate to your page. Right click where your image should be appearing and click inspect element. Find the html in the window that pops up and hover over the img/facebook-wrap.png it should show you either a small preview of your image in a box or a not found error.
If the image appears in the box, then probably some CSS is hiding it. If a image doesn't appear then the SRC is wrong and you will need to look at relative paths, absolute paths and the file name.
Good luck :)