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
Nathan St. Clair
879 PointsCSS file won't work in index.html.
I am currently working through the "How to make a website" tutorial. I am working on the CSS session, and I can't get the main.css file to import into the index.html file. I have checked it several times for mistakes and typos and I can't find any. Does anyone have any suggestions or had this same problem?
Thanks
Nathan St. Clair
879 PointsHere is what I have entered.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Nathan St. Clair | Photographer</title>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css">
</head>
<body>
Jovanny Elias
16,204 PointsHi, I went ahead and edited your post to fix how your code should be displayed take a look below and/or look at the markdown cheatsheet below every forum post.
1 Answer
Jovanny Elias
16,204 PointsIf your files are under the same directory as your html remove css/ just write down the normalize.css.
If you have then a directory up add ../ before css/normalize.css
For example
Within the same folder, just use the file name:
href="thefile.html"
Within a super-directory:
href="../thefile.html"
Within a sub-directory:
href="subdir/thefile.html"

Evans Attafuah
18,277 PointsEvans Attafuah
18,277 PointsPaste your code here to see if I can debug the problem.