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

Amer Ameen
Amer Ameen
286 Points

I followed all the steps to integrate a second CSS file (main.css) however it does not change my website!

Nothing is working, like the background-color of the body. It isnt recognizing the .CSS file.

Christopher van Ruitenbeek
Christopher van Ruitenbeek
13,705 Points

Could you add your code? Else it's hard to see what went wrong ^.^

Amer Ameen
Amer Ameen
286 Points

<head> <meta charset="utf-8"> <title>Aamer Mahmud | Thriver </title> <link rel="style sheet" href="css/normalize.css"> <link rel="style sheet" href="css/Thrive.css"> </head>

Thats my code in my index.html file. and my Thrive.css file has:

body { background-color: orange; }

It isn't changing the background colour though! I dont think it is recognizing that Thrive.css exists.

1 Answer

Hi Amer, there are some mistakes in your code below:

<meta charset="utf-8">
<title>Aamer Mahmud | Thriver </title>
<link rel="style sheet" href="css/normalize.css">
<link rel="style sheet" href="css/Thrive.css">

correct it as follows:

<meta charset="utf-8">
<title>Aamer Mahmud | Thriver </title>
<link rel="stylesheet" type="text/css" href="css/normalize.css">
<link rel="stylesheet" type="text/css" href="css/Thrive.css">

Question: the file thrive.css is spelt with a capital T. Is the file in your css folder spelt with a capital T or lower case t? You need to correct this if it is wrong.

Amer Ameen
Amer Ameen
286 Points

Hey Saskia, I did all of the above and I still cant format my website using external .CSS files. It's really really frustrating

Chris Andruszko
Chris Andruszko
18,392 Points

I can't think of any reason why Saskia's code wouldn't work, so maybe it's the path? Is the path correct? Is the css file in the css folder?

Are you sure, you named the file correctly and placed it inside of the css folder in your workspace directory? If the css files are not placed INSIDe of the css folder, this won't work, because with this code, the interpreting browser will look inside css/ to find the files normalize.css and Thrive.css

And as I said, double check on your spellng. Capital T oder lower case t in Thrive.css?

It should definitely work.