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 CSS: Cascading Style Sheets Use ID Selectors

Alejandro Garcia
Alejandro Garcia
352 Points

Can't link index.html and main.css

Code not transferring over. My syntax looks good and I think i'm doing everything right. Can someone help please. Below are my snapshots.

3 Answers

In 'index.html', you are linking to the 'main.css' file as if it is in the same folder as 'index.html'. However, 'main.css' is in the 'CSS'. folder. So, change the 'main.css' linking line in 'index.html' file as below and orange background-color will pop-out:

<link rel="stylesheet" href="CSS/main.css">
Alejandro Garcia
Alejandro Garcia
352 Points

Thanks so much everyone, this helped me solve the problem.

Lisa Nguyen
Lisa Nguyen
22,731 Points

Hi Alejandro, can you please try the code below and do the same for your normalize stylesheet as you will have to specify where the stylesheet is in order to link it to the html:

<link rel="stylesheet" href="CSS/main.css">
Aaron Jennings
Aaron Jennings
522 Points

Also remember to have your "normalize" css link before the "main" css link.