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

Matt Trask
Matt Trask
10,027 Points

Smells Like Bakin imgs

Hi all,

I downloaded the file that had all the IMG's for Smells Like Bakin. I moved them all over to their own folder on my macbook, but I didnt change the names(logo.gif is still the same). When I go to the code in for the img tag, it still comes up with a question mark. Can anyone help me?

17 Answers

akc
akc
11,729 Points

Did you change the path (src) of the image? If you put them in the img folder, you have to to state "img/logo.gif" or if you put it in folder1 you have to state "folder1/logo.gif".

Matt Trask
Matt Trask
10,027 Points

the path to it from my desktop is smells-like-bakin/img/logo.gif and it doesnt respond when i put it in that way

akc
akc
11,729 Points

is your index.html in your "smells-like-bakin" folder?

Matt Trask
Matt Trask
10,027 Points

now it is. it was outside of the file, but I put it in there. Let me see if that works.

Matt Trask
Matt Trask
10,027 Points

Alfred it didnt work.

akc
akc
11,729 Points

Please make sure this is the case: 1) index.html is in your "smells-like-bakin" folder (directly in it, not any subfolder like "img". 2) logo.gif is in your "smells-like-bakin/img" folder (img folder is a subfolder of smells-like-bakin folder) 3) the image path in your index.html is src="img/logo.gif"

Matt Trask
Matt Trask
10,027 Points

I have it in an img folder. the path from my desktop to the img is smells-like-bakin/img/logo.gif and it still wont recognize it.

Matt Trask
Matt Trask
10,027 Points

Ive tried to follow the stylesheet below to post code on here and I cant even figure it out. Im a total newbie at this stuff.

Mike Morales
Mike Morales
19,833 Points

Instead of using the smells-like-bakin/img/logo.gif why don't you try and remove the smells-like-bakin part and try and work with img/logo.gif instead, and see if that helps?

Mike Morales
Mike Morales
19,833 Points

Hi Matt, is your .html file in a folder, or is it sitting on your desktop?

Matt Trask
Matt Trask
10,027 Points

the index.html? its in my img file on a tip from alfred just now but it didnt work.

Elliott Frazier
Elliott Frazier
Courses Plus Student 9,647 Points

you need to put your index.html file in the "smells-like-bakin" folder. not the img.

Mike Morales
Mike Morales
19,833 Points

If i read your thread correctly you will need to put your index.html in its own folder. but you will also need to put your image folder inside the folder that has your index.html. Hope that made sense?

Matt Trask
Matt Trask
10,027 Points

right now I have a Smells Like Bakin file, and inside of that is the following: IMG, CSS, and index.html. Thats how it should be?

Matt Trask
Matt Trask
10,027 Points

I have a screen shot of how I have it, but I dont know how to post it.

Matt Trask
Matt Trask
10,027 Points

Thanks to Elliott, here is my code on Codepen.com

Matt Trask
Matt Trask
10,027 Points

did that, still got the question mark

Elliott Frazier
Elliott Frazier
Courses Plus Student 9,647 Points

so just to recap your index.html file is in the "smells-like-bakin" folder and your images are in the "img" folder, right?

Matt Trask
Matt Trask
10,027 Points

yes. "smells-like-bakin" is my main folder. In it is the index.html, img, and css and the respective files for each one.

Elliott Frazier
PLUS
Elliott Frazier
Courses Plus Student 9,647 Points

well the code looks fine, it must be somewhere in your directory because it's working fine when I insert my image. see for yourself

Matt Trask
Matt Trask
10,027 Points

do you have an idea for me to fix the directory?

Matt Trask
Matt Trask
10,027 Points

Cool, thank you. I think I read in other threads this would be my issue but I wasnt sure, so I wanted to post and see.

Elliott Frazier
PLUS
Elliott Frazier
Courses Plus Student 9,647 Points

Make a new folder on your desktop called "home", then create another new folder inside the "home" folder called "img", then move your index.html to "home", and move your logo.gif to the "img" folder.

Matt Trask
Matt Trask
10,027 Points

will the code the be home/img/logo.gif or just ing/logo.gif?

Chase Lee
Chase Lee
29,275 Points

Could you give us a screen shot on your file are layout .

Matt Trask
Matt Trask
10,027 Points

I have a screenshot but no clue how to post it

Chase Lee
Chase Lee
29,275 Points
  1. Go to imgur
  2. Click on Computer
  3. Select the image you saved when taking your screenshot
  4. Post link to the image here
Chase Lee
Chase Lee
29,275 Points

So this should work:

<img src="img/twitter.gif">
Matt Trask
Matt Trask
10,027 Points

I dont know what I did but it works! Thank you everyone for your suggestions!