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
breckconley
1,470 Pointsproblems
my css thing that I'm making myself is just showing this:
Index of /
PetFacts.html style.css.
how do I get this to work?

breckconley
1,470 Points<head>
<title>Pet Facts</title>
<link rel="stylesheet" href="style.css">
</head>
there it is.

Caleb Kleveter
Treehouse Moderator 37,862 PointsWhat does your file tree look like? Make sure that index.html
is not in a folder.

breckconley
1,470 Pointsno, it is not.

Jason Anello
Courses Plus Student 94,610 PointsIt does not look like you have an index.html file.

breckconley
1,470 Pointswhat do you mean?

breckconley
1,470 Pointsthis is what my tree looks like
Pet Facts (the name of the thing i'm making)
css (a folder)
style.css
index.html(not in the folder, it also used to be PetFacts.html)
if you want to see for yourself, see this,
1 Answer

Jason Anello
Courses Plus Student 94,610 PointsIt looks like your problem might be that you don't have a file specifically named "index.html" all lowercase. You have a file named "PetFacts.html" This would be fine for a sub-page of your site but the main home page of your site should be named "index.html"
I don't know if you're using workspaces but when you preview your site the server is looking for an "index.html" file and if it doesn't find one then it will list the directory contents. That is what it looks like is happening with you. It's showing that you have an html and css file in that directory.
If this is the case then renaming your file to "index.html" should solve your problem.

Jason Anello
Courses Plus Student 94,610 PointsIf you're using workspaces then you can post a snapshot of your workspace and that would make it easier to track down the problem.

breckconley
1,470 PointsI also just put a link in.

Jason Anello
Courses Plus Student 94,610 PointsWorkspace links don't work.
Here's some info on taking a snapshot: https://teamtreehouse.com/forum/workspace-snapshots
The snapshot icon is near the preview icon.
Jacob Mishkin
23,117 PointsJacob Mishkin
23,117 Pointscan you post the head tag of your HTML, there is probably an issues with linking your css, and your html.