Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML How to Make a Website Creating HTML Content Include External CSS

CSS File Not Linking to the Index File or displaying as in the video

Hello, I'm new to the site and just ran into my first difficulty. I've gone through and linked the normalize.css file for this lesson to the index.html file, but it's not matching the results described in the video.

The list still appears with the bullet point and I'm not sure the font has actually updated.

Here's an example of my code

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Aaron Samsky | Designer</title> <link rel="stlyesheet" href="css/normalize.css"> </head>

The link matches what is shown in the video exactly.

There's also a quote and underscore appearing above the display of my title. I'm on Mac working in Chrome, but have also checked it in Firefox and the appearance is the same.

Has anyone else encountered this issue?

Thanks!

2 Answers

Laura Cressman
Laura Cressman
12,548 Points

Without seeing my code, I have a few guesses. First, did you make sure to link to the normalize.css file first, before linking to style.css? If you link to normalize.css after linking to style.css, the normalize.css styles will all get applied second, and overwrite any styles you have in the style.css file. Yikes! Otherwise, make sure that your links are typed exactly correctly, like <link rel="stylesheet" href="css/style.css">. Another common pitfall is not getting the path to the CSS file right. For example, if you didn't make a CSS folder and put the style.css file in it, then the link won't work. Double check to make sure that you have a CSS folder, and that your style.css file is in it. Also make sure your CSS folder is in the same directory as your index.html file. Does any of this help? Hugs, Laura:)

Thanks Laura. Everything seems to be okay and I've followed that same syntax you outlined above. I've move forward a bit to the "Use ID Selectors lesson" and it's also not reading the CSS file I'm creating for this lesson. I'm totally stumped on this one.

Laura Cressman
Laura Cressman
12,548 Points

Aaron, Oh no! Sorry to hear that. Too bad you can't share workspaces. If you are using workspaces, would you mind just copying and pasting your HTML code? You can e-mail me at lauracressman@mac.com. :)Hopefully we can get to the bottom of this!

It might be a problem because some people like me don't use "Workspace" do you work from notepad on pc or mac and using browser for testing code? So you have to write HTML code for specific folder on your PC/MAC to run that css file. For example my code for entering .css file is like this: <link rel="stylesheet" href="c://folder/css/normalize.css"> As you can see I used c://folder/css/normalize.css because my "normalize.css" file is in C directory in folder named "folder" and in that folder is another one "css" and there is "normalize.css". In course video he uploaded .css file on workspace so he can only do this: css/normalize.css So you have to make new folder in any directory you like and set there all files you need for your website. I created one folder named "folder" in C directory and there I set all my files. Maybe is the same if you work on MAC but this option is for Windows. I hope I helped you.