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 How to Make a Website CSS: Cascading Style Sheets Use ID Selectors

CSS file won't link properly. Exact syntax and directory placement.

I've followed Nick's directions 100% while adding "main.css" to the <head> of the HTML page. It's positioned beneath the "normalize.css" link and the file has been dragged to the CSS folder.

This is how to looks in my <head> tag:

<link rel="stylesheet" href="css/normalize.css"> <link rel="stylesheet" href="css/main.css">

But when I try to change anything on "main.css," nothing is affected on index.html. Any ideas?

3 Answers

Laura Cressman
Laura Cressman
12,548 Points

For some reason, my browser isn't loading your code, but I'm assuming it says <link rel="stylesheet" href="css/main.css">? If so, are you remembering to save your changes in main.css before reloading? Or possibly your main.css file isn't in a folder?

I've placed it in the CSS folder and I've made sure to save the file. I checked all the little things that would prevent it from working. I can't imagine what it could be.

I can't see your code either but this is how your style sheets should be linked:

link rel="stylesheet" href="css/normalize.css"

Followed by:

link rel="stylesheet" href="css/main.css"

Your actual code will be wrapped in angle brackets. I took them out so the code would show

Here is a link to the code: http://codepen.io/anon/pen/bwquF/

Make sure you haven't added any capital letters or spaces where there shouldn't be and that your file location is wrapped in speech marks.

Does this help?

This is what I copy/pasted in regards to code. Unfortunately, I can't find any syntactical errors that would keep it from working.

<link rel="stylesheet" href="css/normalize.css">
    <link rel="stylesheet" href="css/main.css">