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
Claire Mack
357 PointsCSS Normalize file
Hi, I've saved the css normalize file to my desktop. Please can someone show me how to link it into my code. I know we've learnt the link code, but I'm not sure how I path it to the desktop in this piece of code?
8 Answers
Adam Sackfield
Courses Plus Student 19,663 PointsWell the desktop isn't the ideal place to store projects, so lets assume you create a folder call projects on your primary drive which i will also assume is C:. Then inside projects create a new folder with the name of this project so lets says Claire. So at the moment we have
C > PROJECTS > CLAIRE
Now add your index.html file to claire and then add a new folder called CSS and inside here put the normalize file you downloaded. In the index file to link it do the following.
<link rel="stylesheet" href="css/normalize.css"
You only need to specify the directions to the file from the location of the current file you are writing in, in this case the index.html is in Claire and to find the normalize it will need to enter the CSS folder and there it shall find it.
Claire Mack
357 PointsAdam, thank you for the help..I'm still not 100% I fully understand how it knows to look in there. Do I need to type anything right at the top where it says doc?
Claire Mack
357 PointsSo far...all I did was take the files and put them under c drive in "claire", folder and then I typed up the link rel code etc...
Adam Sackfield
Courses Plus Student 19,663 PointsGoto to a site called codepen.io and copy in the contents of your index.html file click save and then share and post the link in here and will investigate :)
Claire Mack
357 Points<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>Smells Like Bakin' Cupcake Company</title> <link rel="stylesheet" href="css/normalize.css" type="text/css" media="screen"> </head>
<body> <div id="featured-cupcake"> <h2>Cupcake of the Week</h2> <img src="img/featured-cupcake.jpg"> </div> </body> </html>
Adam Sackfield
Courses Plus Student 19,663 PointsHere
<!doctype html>
<head>
<link href="normalize.css"> // Or css/normalize.css if in a folder called css.
</head>
Claire Mack
357 PointsHi Adam, I'm really bleak, all has been coming on so nicely so far, but just couldn't progress past the classes and div part of the smells like bakin website...it was because I couldnt get through that, that I realised I obviously did something incorrect in linking the file. although it allows me to pass the linking file task...but I had never downloaded it previously. I'm not sure what I need to do to continue again :(
Adam Sackfield
Courses Plus Student 19,663 PointsMaybe his video will help http://www.lynda.com/Web-Content-Strategy-tutorials/Creating-proper-file-structure/757/47051-4.html
Brandan Booth
9,321 PointsKhurram Muslim
12,391 PointsIt should be located in folder where you index.html file is so its like css/normalize.css