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.

CSS How to Make a Website CSS: Cascading Style Sheets Use ID Selectors

Arthur Walton
seal-mask
.a{fill-rule:evenodd;}techdegree
Arthur Walton
Python Web Development Techdegree Student 3,906 Points

how to get main.css and normalize.css to work inside my index.html

my code is almost identical to nick Pettit's at the moment and yet when I type css into main.css like the background color, it doesn't change it in the actual website. I have linked it appropriately as well. any suggestions?

11 Answers

Arthur Walton
seal-mask
.a{fill-rule:evenodd;}techdegree
Arthur Walton
Python Web Development Techdegree Student 3,906 Points

'''html <head> <meta charset="utf-8"> <title>Sonny Walton | Designer</title> <link rel="stylesheet" href="css/normalize.css"> <link rel="stylesheet" href="css/main.css"> </head> '''

Arthur Walton
seal-mask
.a{fill-rule:evenodd;}techdegree
Arthur Walton
Python Web Development Techdegree Student 3,906 Points

<head> <meta charset="utf-8"> <title>Sonny Walton | Designer</title> <link rel="stylesheet" href="css/normalize.css"> <link rel="stylesheet" href="css/main.css"> </head>

David Jarrin
PLUS
David Jarrin
Courses Plus Student 11,182 Points

you might have your link information in the wrong place then, try putting it in your head section

Arthur Walton
seal-mask
.a{fill-rule:evenodd;}techdegree
Arthur Walton
Python Web Development Techdegree Student 3,906 Points

I have it in the head section I believe. here

 <head>
    <meta charset="utf-8">
    <title>Sonny Walton | Designer</title>
    <link rel="stylesheet" href="css/normalize.css">
    <link rel="stylesheet" href="css/main.css">
  </head> 
David Jarrin
PLUS
David Jarrin
Courses Plus Student 11,182 Points

is your main.css in a folder named css that is in the same directory as your html document? If main.css is just in the same file/directory as your html document take the "css/" off of your css/main.css

David Jarrin
PLUS
David Jarrin
Courses Plus Student 11,182 Points

ok, I think you could do one of two things. Link to ../css/main.css (with two dots to begin with) or in a less complicated fashion just take your html documents out of the html folder and just put them at the same level as your css folder.

Try adding the following: type="text/css" after the word stylesheet..

Did you try both at the same time? David is right, you have to correct your file path the way that he is telling you, and then you have to add type="text/css" to your css stylesheet links in the head.

Arthur Walton
seal-mask
.a{fill-rule:evenodd;}techdegree
Arthur Walton
Python Web Development Techdegree Student 3,906 Points

Gotcha. well I finally found out that for some reason, the css folder itself wasn't pushing through the content from both files. I found this out by putting the files into my img folder, then linking them that way, which worked. Then I tried renaming the css folder to another name, which still didn't work. then for some reason, when I switched the folder name back to css, it ended up working. Not sure exactly what happened, but regardless, i'm just glad it's working. thank you guys for everything.