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

Workspace is not recognizing my css files and applying the element changes.

Workspace is not recognizing my css files "normalize.css" or "main.css". Both are in the css folder. The relative path link in the code in the index.html file is the same as shown on the instructors video, but when I view the page, the elements are not applied. I tried clearing the cache and refreshing the page in the viewer, but still no changes.

If it makes any difference, when I first started the css exercises in this lesson, I was not able to download the "normalize.css" file from the site, so I just opened it and copied the code, creating a new file. Could this have caused the normalize.css file and other css files not to function properly?

It almost looks to me like the site is not recognizing the path to the css files, but since it matches the instructors code, I do not know what else the path might be. Suggestions? Thanks.

4 Answers

Could you post the contents of the head tag of your index.html file?

I'd check a few things: Make sure (1) Your index.html file is saved (2) Your CSS files are saved and saved as .css (3) Your index.html file isn't in the CSS folder (4) You don't use any caps in the names of your files or folders

That's all I can think of without seeing the actual code. I'm not sure what exact lesson you're referring to but, I think the links should look like this:

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

Good luck!

Yes, this was the code I was referring to, from the How To Make A Website lesson. I discovered the problem myself, it was a missing close tag > at the end of the path. Thanks for your help!

Hello, I am in the same area with the same problem but I don't appear to be missing any close tags. I also had to do a workaround to get normalize (though now I don't recall what). I have spent quite a while deleting and retyping, recreating, refreshing and saving but am truly stuck. Here is my code:

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Michelle | Programmer</title> <link rel="stylesheet" href="css/normalize.css"> <link rel="stylesheet" href="css/main.css"> </head>

The video asks that we try two things in Main: first to change the background color to orange second to remove the underlining from the anchor tags

Neither one of these worked when I tried numerous times. Thank you in advance for any input.

Michelle

Michelle, I notice that you included a closing head tag but not an opening. Did you just leave that out of the snippet, or do you not have one in your code? Also, is it just those two changes (background color and text-decoration) that aren't having any effective, or are none of style rules having any effect? (Sorry, I can't remember if the CSS files come with code in them already or not)

I would check that the path is correct: Your CSS files should be in a folder named CSS and your html files should be loose in workspace, i.e. not in a folder. Also make sure that you've spelled the CSS file names correctly with no capital letters and with the extension .css.

Good luck! --Elizabeth