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

no icons displaying?

when I link the twitter and facebook logo in my code, it doesn't appear on the preview! can anyone help me figure out why this is? thanks

Imgur

Hi Ashley. I'm not to sure what you mean. Is it that the images are not showing at all? This might well be because your img tags are not closed correct. Your code has <img src="path-to-your-file.jpg" alt="">. Your closing tag is not correct, it should be <img src="path-to-your-file.jpg" alt="" />. I hope this helps.

8 Answers

try adding the height and width attributes to your code

<img src="youricon.png" alt="your icon" width="10" height="10">

Obviously use your own image links and the actually pixel size of each icon got the height and width

As mentioned above, I think it is the closing of your img tags themselves which is the problem. Correct these and I'm sure they will all appear fine :)

Hi, ive tried to change it but it still doesnt seem to be working, what i mean is that when i look at the file in workspace preview, the images don't seem to appear in the footer at all. The image below shows what I've changed so far

Imgur

Hi Ashley. Do the images within your <section> </section> show? Do the facebook and twitter images only dissapear when you add the links to them or are they not displaying whether they are linked or not? ...Trying to narrow down what could be wrong.

and they're the facebook and twitter logo that treehouse has supplied :)

Heath Hughes
Heath Hughes
19,766 Points

Ashley,

Anytime something expected isn't showing up, i'd check the following:

  1. Be sure that your code is saved and that you refreshed the page
  2. Be sure that the code syntax and path to the image (or whatever it is) is correct. As long as your images are indeed in the img folder, yours looks right.
  3. Be sure the CSS isn't somehow covering or pushing the element off the page. You can try giving the element that's not appearing a bright background-color too see if it's actually on the page you're looking at.
uttam bhaskar
uttam bhaskar
3,618 Points

Hello Ashley,

Try to remove the link tag and check whether the images are visible or not. If they are visible then check the CSS of your link tag.

Hi everyone, thanks so much for all of the helpful suggestions. I removed the link tag and the logo still wasn't visible, however I realised that when i use the same "img src" tag with a different image it worked. The twitter and facebook logo's seemed to just disappear from my workspace so i started a brand new workspace with the same code and uploaded all the files again but it still won't upload the facebook and twitter png's. I've tried re-opening multiple times, im using a PC. does any one know what i should do?

Heath Hughes
Heath Hughes
19,766 Points

Can you show us an up to date screen shot of your HTML, CSS, and file tree with your images? Also, which browser and browser version are you using?