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
Matthew Mercer
291 PointsMy page has turned into an Index of /-- what happened?
I was trying to get my images to display and so unzipped the files i had downloaded. When I moved those files to the img folder and clicked the small eyeball to see the demo of my page, all I saw was this:
Index of /
.DS_Store
css/
img/
I'm not sure where I went wrong.
4 Answers
Chris Higgins
6,813 PointsThis mainly happens when you dont have a index page. What I would try it to make a index.html page and put some content in there. It 's just showing you the directory of the website at the moment.
Matthew Mercer
291 Pointsthe page was working fine before I deleted the pictures that I had uploaded, unzipped them in my computer, re-uploaded them, and moved them to the img folder. Before I did all that, the page was up and running fine, displaying as the tutorials say it should. That makes me think that i have an index page already. Here is the code i have written so far:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Matthew Mercer: Designer</title>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css">
</head>
<body>
<header>
<a href="index.html" id="logo">
<h1>Matthew Mercer</h1>
<h2>Designer</h2>
</a>
<nav>
<ul>
<li><a href="index.html">Portfolio</a></li>
<li><a href="about.html">About</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</nav>
</header>
<div id="wrapper">
<section>
<ul>
<li>
<a href="img/number-01.jpg">
<img src="img/numbers-01.jpg" alt="">
<p>Experimentation with color and texture.</p>
</a>
</li>
<li>
<a href="img/number-02.jpg">
<img src="img/numbers-02.jpg" alt="">
<p>Playing with blending modes in Photoshop.</p>
</a>
</li>
<li>
<a href="img/number-06.jpg">
<img src="img/numbers-06.jpg" alt="">
<p>Trying to create an 80's style glow.</p>
</a>
</li>
<li>
<a href="img/number-09.jpg">
<img src="img/numbers-09.jpg" alt="">
<p>Drips created using Photoshop brushes.</p>
</a>
</li>
<li>
<a href="img/number-12.jpg">
<img src="img/numbers-12.jpg" alt="">
<p>Creating shapes using repetition.</p>
</a>
</li>
</ul>
</section>
<footer>
<a href="http://twitter.com/mattmerce"><img src="img/twitter-wrap.png"alt="Twitter Logo"></a>
<a href="http://facebook.com/matthew.mercer.77"><img src="img/facebook-wrap.png"alt="Facebook Logo"></a>
<p>© 2015 Matthew Mercer.</p>
</footer>
</div>
</body>
</html>
Nick Pettit
Treehouse TeacherHi Matthew,
I saw your email that was forwarded to me; I've been out on vacation all last week, so I apologize for the slow reply!
It sounds like you moved your index.html file into one of the folders. Your directory structure should contain an index.html in the root. In other words, it should be "next to" the /css and /img folders, not inside one of them. The left side of your Workspace should have a file tree that generally looks like this:
index.html
/css
/img
I hope that helps!
Matthew Mercer
291 PointsHello Nick,
Thank you so very much! moving the index.html out from the folder where it had accidentally been moved did indeed fix the problem I was facing. Now my demo page looks exactly like it should.
I wonder if it matters or will matter later down the line that my css and img folders are both located above my index.html on the left side of my screen. Is there a way to arrange it so that the index sits over the css and img folders, or is that completely immaterial to anything regarding the design of my page?
Thanks, again, very much for your help with this!
Nick Pettit
Treehouse TeacherHi Matthew,
The order of the files on the left side doesn't have any impact whatsoever. For example, in a file browser on your computer, you could sort things by date modified, by filename, by filesize, and so on; it's completely immaterial to anything on the page, like you said. :)