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 Take a Mobile-First Approach

Robbie Rice
Robbie Rice
2,448 Points

CSS not working in Workspace

Normalize and Main do not have any styling effects on index.html in my work space. I downloaded the project file and replaced my code with the code there but it still didn't work. I'm using Chrome incidentally. Has anyone experienced something similar?

Hi Robbie,

Can you post your HTML code that is in between the head tags please?

Thanks

-Rich

4 Answers

Hi Robbie,

Sorry for the delay. The code itself looks fine. A few things to check would be:

  • The location of the style sheets - Make sure they are located within a css folder.
  • Casing - Check the files are named normalize.css and not something like Normalize.css (capital N) for example.
  • Location of the HTML file - Make sure this is in the root of the website and not in the same css folder as the style sheets.

One quick way to check would be to change:

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

to:

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

This will check if the style sheet is in the same folder / at the same level as the HTML file and not in a css sub folder.

Hope one of the above helps.

-Rich

Robbie Rice
Robbie Rice
2,448 Points

Hi Rich, here you go:

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

Pavle Lucic
Pavle Lucic
10,801 Points

Robbie Rice

Look at your file tree. You shoud have folder with name of css and files into.

Check and reply!

Robbie Rice
Robbie Rice
2,448 Points

Hi Pavle, Rich:

Thanks for your reply - worked it out: the css folder was capitalized as CSS... silly, silly mistake!

No problem. Glad you managed to sort it.

-Rich