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

CSS CSS Foundations Values and Units Relative Length Units

Matt Adkisson
Matt Adkisson
4,035 Points

Index of/

Hi, I'm having the same issue here that I did with the previous video. Somehow my .html file is not communicating with the .css files and when I go to view the project in the browser from Workspaces I just get an "index of/" list that looks nothing like the video.

I've tried renaming the files. Changing the html file to simply "index.html" puts the content into a basic html page but none of the css is applied.

I've tried deleting everything and redownloading the project files. That did nothing.

I've tried adding a path to my css folder into the html like this;

<link rel="stylesheet" href="css/page-styles.css">
<link rel="stylesheet" href="css/relative-length-units.css">    

that did nothing.

I keep getting the same Index of/ page when I try to view the project in my browser, making it impossible to follow along with the video. I really don't want to give up on this path, anyone out there have any ideas?

It seems like a file path issue, but I've set everything up the exact same way I've done up to this point and everything has worked fine up until these past two lessons. Argh... Thanks, Matt

1 Answer

Erik McClintock
Erik McClintock
45,783 Points

Matt,

The most likely/common cause of CSS styles not applying to your page(s) would certainly be incorrect file paths in the href attributes of your link tags. Do you have CSS files called 'page-styles.css' and 'relative-length-units.css' (EXACTLY), and do they indeed live in a folder called 'css' that is on the same level as the HTML file(s) that you're trying to link them up to?

Erik

Matt Adkisson
Matt Adkisson
4,035 Points

Changing the html file name from "relative-units.html" to "index.html" and getting rid of the "css" path and folder seems to have it working. Weird. Thanks for the help.