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

Workspace preview will not show changes made in main.css

Both index.html and main.css are coded exactly like the video but the Workspace preview will not display any code I put in main.css.

3 Answers

akak
akak
29,445 Points

In your code I see one thing missing:

 <link rel"stylesheet" href="css/normalize.css">
 <link rel"stylesheet" href="css/main.css">

You need to add equal signs so it looks like

 <link rel="stylesheet" href="css/normalize.css">
 <link rel="stylesheet" href="css/main.css">

After changer it works for me :)

Thanks for your help! :-) I spent so long looking at the code, I don't know how I missed it

akak
akak
29,445 Points

Glad I could help :) In time you'll be able to narrow a problem to a certain area of the code which helps with debugging. If you try to go through all the code at the same time some things often gets overlooked. If you focus on smaller portion it's easier to find a mistake. Happy coding :)

Thanks I had the same problem. You always need those extra set of eyes

akak
akak
29,445 Points

Check if your link to the stylesheet (in index.html) is correct. Mine from that lesson looked like this:

<link rel="stylesheet" type="text/css" href="css/style.css">
akak
akak
29,445 Points

type="text/css" is not necessary, I was thinking more about issue in the href. Can you share your code or workspace snapshot? It's difficult to think of a reason without seeing the whole picture ;)

Hi - here is a snapshot of my workspace: https://w.trhou.se/jvy3q4ll73