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 Center the Wrapper

None of my main.css styling is showing up.

My html and css files look identical to the video. I saved multiple times and refreshed/reopened the page several times and nothing happens. What could be going wrong here?

4 Answers

James Hall-Treworgy
James Hall-Treworgy
3,326 Points

Perfect! Found the problem! Your css folder name is in all caps! Change it from CSS to just css and the magic will happen!

Let me know if that doesn't make sense :)

Haha, classic mistake. Thank you so much for your help I really appreciate it! And just in time as I have to go to work. Thanks again!

James Hall-Treworgy
James Hall-Treworgy
3,326 Points

Hello : )

You probably just need to link your main.css page.

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

If you have it in a folder should be like this like below.  Note the "css/", change that to whatever the folder name you assigned is.  

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

I did link it in the head like the video shows. Here's what I have:

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

James Hall-Treworgy
James Hall-Treworgy
3,326 Points

Hmm, go to your workspaces and on the top right make a snapshot of your environment. Then post the link so we can take a more thorough look. :)

https://w.trhou.se/b6ecii0he5

Should be it, if I understand correctly.

There could be several reasons for that. Are you using workspaces?

check this:

  • ALL files are saved before loading the page
  • your linking has the correct names of folders and files in it (copy paste the code from the downloadable files. Sometime there is a space off that kills everything.
  • all your html tags are correctly opened and closed
  • all your CSS uses the correct selector
  • all your CSS commands are written withing {}
  • all your CSS commands end with a ;

This list is by no means exhaustive but should give you an idea for trouble shooting your code. If you want to, please post your CSS as well because your html looks good.