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

HTML How to Make a Website Adding Pages to a Website Add Iconography

CSS doesnt loads

Hi, i have a problem with css, i cheked everything, but i dont understand whats wrong, when i type code to main.css, the webpage doesnt load anything in from css file, but if i type css code in html file like <style></style> css loads, heres the code example from html page :

<head> <meta charset="utf=8"> <title>Matas|Design</title> <link rel="stylesheet" href="css/normalize.css"> <link href="https://fonts.googleapis.com/css?family=Alegreya+Sans:800i" rel="stylesheet"> <link rel="stylesheet" href="css/main.css"> <style> .contact-info { list-style:none; margin:0; padding:0; font-size:0.9em; }

</style>

5 Answers

Try moving the google font link above the normalize.css and main.css

<link href="https://fonts.googleapis.com/css?family=Alegreya+Sans:800i" rel="stylesheet">
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css">
Steven Parker
Steven Parker
231,269 Points

Check that the file is located in the directory.

Your code says the file path is "css/main.css", so make sure the file is named main.css and is located in the css directory.

To enable a more complete analysis you can make a snapshot of your workspace and provide the link.

Heres the snapshot https://w.trhou.se/x20wfjf5dx

Steven Parker
Steven Parker
231,269 Points

You have a syntax error in the CSS file.

At about line 127, you have a stray extra close brace ("}") that causes the rules after it to be ignored.

Just remove that and your CSS file should work again.

thank you