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

Jack Goldie
PLUS
Jack Goldie
Courses Plus Student 555 Points

Help needed please!

Hi, I have been stuck for days trying to insert the <div class="container" into my code and achieving the correct result. When I try to insert my code onto this forum it misses out a large chunk from the top and some from the bottom. I am not sure if I have a small error in my code or if I simply have my files saved in the wrong place. Also after downloading google chrome this morning my pictures are no longer showing even when I open in safari.

I would greatly appreciate if someone could take a look at my code and tell me what is wrong. I may need an alternative way of sending you my code.

Thanks

John Wheal
John Wheal
27,969 Points

Try using CodePen to send the code.

missgeekbunny
missgeekbunny
37,033 Points

With your images I would probably check the path to the image. It's not showing up for mine and I remember once designing a theme where the image worked great til I looked at it in other browsers and then it stopped working in safari. It could be something like that. For me it worked because I had it right at one point and my browser cached it but with the other browsers lacking the cache the image stopped working.

Colin Stodd
Colin Stodd
3,160 Points

If you having trouble getting your image to show up there are a few things that you should be aware of:

Make sure you have the Pictures or Images in the same folder as your website. i.e. the folder you keep your website files might be called "MySite". This folder should contain your <b>index.html, about.html</b>, etc... and any files you want to include in your website.

<b>NOTE<b> To keep things a bit more organized it might be good to throw all of your Pictures/Images in a folder called <b>"img"</b>. and when you put the link in your HTML, you need to make sure that you have the correct file path. i.e. <img src="img/featured-cupcake.jpg" alt="Avacado"> Notice that the file path to the image is <b>"img/"</b> then the name of the file which is <b>"feature-cupcake.jpg"</b> <b>NOTE</b> Make sure you are including the type of image it is. In our example it was a <b>.jpg</b> file. You would not need to include the <b>"MySite"</b> to the file path, because the files are already in the <b>MySite</b> folder.

Let me know if you need more help

Colin Stodd
Colin Stodd
3,160 Points

The markdown to this website is not that great. Here is a little video tutorial that should help. Video Tutorial

1 Answer

Hopefully Colin's video saved the day!