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!

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


Texture and bg-texture doesn't show up

Being a windows user, I pointed to the "bg-texture.png" and "texture.png" in the following way:


This way of pointing to the directory seems to work for every other image, like the cupcake photos and gifs. But in case of the background for body and button, I'm shown the solid red and greenish color,instead of the textured ones. If indeed my process of pointing to the directory is wrong, then how come the other images are showing perfectly?

The directory to the images that show up just fine:

src="E:\Treehouse\Stuff\Introduction to Text Editors\img\you-bake-me-blush.gif" alt =... >

Can anyone please tell me what am I missing here?

2 Answers

James Barnett
James Barnett
39,199 Points

Sounds like you've got a file path issue with your images.

The way it works is that you have to put your images in the correct folder relative, to your HTML file.

Here's an example:

file directory structure example

Does that help?

If not, you can read up about absolute vs relative paths

Got it! Messed up a bit with the "relative to HTML file" thing. It's working fine now. Thanks a bunch! :D

Wayne Priestley
Wayne Priestley
19,579 Points

I'm not sure how you think that a difference in the operating system means you have to point to the image file in a different way. It is where it is so the operating system should not make a difference, whichever system you use the file path is what is required.

Having said that, your first URL looks fine, but the second does not, in particular you have spaces in-between 'Introduction to Text Editors' so i think that could be your problem.

I didn't highlight on the point of operating system. I just thought it be somewhat convenient for the one who's going to answer my question.And I mentioned the directories to recheck whether I'm mistaken somewhere.

The second url where you think the problem is, works perfectly. The problem is with the first one.

Thanks anyways.