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

HTML

Add social media links

Hello, I have a problem with Add social media links challenge. I would post my code but it doesn't display as a code, can someone help with that too? I think everything is according to the video but the images don't show on my preview website. Could the reason be that the files are in ".png" format? For some reason they don't display properly like the ".jpg" format files when I click them in Workspaces. The only thing I can see is the image directory not the image itself. Example: "img/facebook-wrap.png".

When i take the challenge and do everything accordingly an error occurs: "[Exception... "<no message>" nsresult: "0x805e0006 (<unknown>)" location: "JS frame :: https://wac.a8b5.edgecastcdn.net/80A8B5/static-assets/assets/application-84671b2be9e95297fa99b6db17c4077c.js :: .send :: line 22" data: no]" Anyone with similar problem or a solution?

7 Answers

To post code, you can use the back tick marks that are on the same key as your ~ mark (mine on my mac are at the top left of my keyboard, above my tab key and left of my 1 key). You can use one back tick mark for inline code like this: <img src="img/photo.png" />. Or you can do a block of code, which are great if you have more than one line of code. You do this by hitting enter to put you on a line or two below the regular text, and then wrapping your code in three of the back ticks to look like this:

<div>
<img src="img/photo.png" />
</div>

Just make sure that you have your back ticks on lines separate from your code. In other words, don't put the back ticks on the same line as any other code you are writing. You can even, just after the first 3 back tick marks, write a word that describes the type of code you are going to write, such as (in all lowercase), "html", "css", "javascript", etc. This will color the code according to that particular coding language.

For more specifics on this, you can click the "Markdown Cheatsheet" below the text area box where you type your comments. Just remember, the little marks that you see, the 1 for inline and 3 for block, are not apostrophes, they are back tick marks. If you simply do an apostrophe, it won't show up as code on here the way you may want it to.

The images would show up just fine being in .png format, so it must be some other part of the code. If you post your code on here, it'll be easier to diagnose the issue.

Thank You for replying. My code:

<footer>
      <a href="https://twitter.com/AnnaBohdziewicz"><img src="img/twitter-wrap.png" alt="Twitter Logo"></a>
      <a href="https://www.facebook.com/a.bohdziewicz"><img src="img/facebook-wrap.png" alt="Facebook Logo"></a>
      <p>&copy; 2014 Anna Bohdziewicz</p>
</footer>

You'll have to make sure the image directory is the same. The code you have written is just fine; however, if they images aren't showing up, then you either have to modify the src to accurately reflect where they are, or move your images so that they are in the src you have them set at in the code.

They are in the img folder exactly like the ones in jpg format. The jpg are displaying correctly and are showing on my preview website but the png don't. I have uploaded them again to Workspaces and they are showing just fine when they are outside the img folder the moment I put them into the img folder they break... My code works when the images are outside the img folder and I link them accordingly. However it still doesn't solve the challenge problem...

To solve the problem with the images being in the img folder they have to be renamed. For some reason names: "facebook.png", "facebook-wrap.png", "twitter.png" and "twitter-wrap.png" make them disappear from the folder after refresh. When I named the images "twittertest.png" and "facebooktest.png" everything works as it should be.

I am having the same issue.

Same issue.