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
Dave Fowler
Courses Plus Student 3,640 PointsCSS/Image problems!
Hello,
For some reason, I can't get images and CSS to display in my browsers! I'm using Firefox and Safari.
I've even downloaded the entire project file, and it's still not working. I know it's not a problem with the code, as it's directly from the site.
I'm wondering if this is a browser/text editor issue??
I'm using TextWrangler 4.0.
Thanks!
5 Answers
James Barnett
39,199 Points@Dave - The 2 most common mistakes when images are not showing up are a typo with the file names or using the wrong file path.
So triple check that you are using the exact name of the image files in your HTML, if that doesn't resolve the issue, check the file paths.
Here's a quick primer on file paths that should get you going.
Let us know how you are getting along with this here in this thread.
Dave Fowler
Courses Plus Student 3,640 PointsThank you James for the quick response!
I'm working with the "Grids" tutorial, and I've downloaded the project files for this.
I've placed the entire folder in my htdocs, for local host, and when I load the index file, the "alt" tags display, but no images. No CSS either.
My htdocs directory is Treehouse, and in this folder is index.html, the images folder, and the css folder.
One image tag is "img src="ing/example.gif">. This should root directly to the images folder yes?
I appreciate any help you can offer.
Thanks again!
Dave Fowler
Courses Plus Student 3,640 PointsCorrection, the image tag is img src="img/example.gif"
James Barnett
39,199 Points
img src="img/example.gif"
That's not a valid tag as it's angle brackets.
However this is:
<img src="img/example.gif">
What that says, is that is to look into the folder containing the index.html file find the folder named img, inside of the img folder look for a file named example.gif
Dave Fowler
Courses Plus Student 3,640 PointsI apologize for the typo.
I have the files laid out like you've mentioned, and it's still not displaying images or CSS.
The example.gif is located inside the img folder, which is located in the same folder as my index.html file.