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
Andrew Shipley
7,781 PointsSetting Up "Absolute Length Units" Lesson in Workspaces
Setting up the CSS files seems a bit different in this lesson. I normally set up like this:
1.Make a file called "index.html" and paste the html in. 2.Make a folder called "css" 3.Make a file called "style.css" paste in the css and drag it to the folder.
Can anyone please explain how to set up the CSS files and folders so I can follow along with this video?
Thanks!
2 Answers
Kristen Law
16,244 PointsYou can download the necessary project files for this video under the Download section below the video. After you unzip it, you can see that there is a "start" folder for html and css at the start of the video (if you want to follow along and write the code with the video) and there is a "final" folder for the finished code at the end of the video.
If you open a blank workspace, you can go to File -> Upload file and then select the files within either the "start" or "final" folder. This will upload the files to your workspace, and you should be good to go!
Edit: If you do it this way, when you hit Preview, your page will look like this since you won't have an index.html. To view your page, you'll just have to click on absolute-units.html.
lovell
7,882 PointsAndrew,
Yes you are right.
The way you mention is a good and correct way to set up the files.
On this lesson, however, the CSS and HTML files are in one folder.
Andrew Shipley
7,781 PointsAndrew Shipley
7,781 PointsYes, that it what it looks like, thanks. But I do not really know what you mean about clicking on absolute units.html.
Should there not always be an index.html?
I knew the exact way to set it up with calling the files and folders the right things and putting them in the right places.
This lesson seems different however.
Kristen Law
16,244 PointsKristen Law
16,244 PointsSorry, I'm not entirely sure I understand your question. Were you able to navigate to the correct page?
When you create a website, you should always have an index.html file, as that is like the "default" page that is shown when someone accesses your site. In this case, however, an index.html page was not provided in the project file download, so that is why you see this. You can easily fix this by changing the name of
absolute-units.htmltoindex.html, or you can just click on theabsolute-units.htmllink to view that page.There is nothing wrong with the way you set up your files and folders, and it is actually good practice to set it up that way. However, in this video, the html and css files were all put in one folder. (You can tell that it is set up that way by looking at the links in the html file. It accesses the css files directly, rather than navigating to "css/page-styles.css", for example.)
Andrew Shipley
7,781 PointsAndrew Shipley
7,781 PointsIt's now working.
Wonderful.
Thanks Kristen!