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 Use ID Selectors

my css won't show up in the site.

heres the css. body { background-color: orange; }

it's supposed to change the background color to orange, but nothing is happening. anyone have any idea?

sean shea
sean shea
22,104 Points

Not sure what the problem would be, but you should consider using a the shorthand instead, just so you can save time. Is any of your other css working? and have you checked with inspect element to see if body shows up?

body {background:orange;}

is the same as body {background-color:orange;}

Hi Nosson,

Can you post the <head> section of your html file?

See this thread for posting code: https://teamtreehouse.com/forum/posting-code-to-the-forum

9 Answers

Have you linked to your CSS in your HTML?

Example:

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

yes i did should have mentioned that, heres what i did. It should be right, because it's identical to the video...

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

We posted at the same time but please see the link I gave for posting code. The forums will strip out html if not posted properly. I went ahead and fixed the code for you.

sean shea
sean shea
22,104 Points

Did you make sure the folder you put your css files in is named css ?

here's the full head, this might help... <head> <meta charset="utf-8"> <title>Nick Pettit</title> <link rel="style sheet" href="css/normalize.css"> <link rel="style sheet" href="css/main.css"> </head>

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

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

maybe it will work now?

You have a space in style sheet

beaten to the punch :P

wow it worked! Thanks so much i would never have known...

Hey guys, I got the same problem. Would you like to see mine?

 <head>
    <meta charset="utf-8">
    <title>Pavel Zhestkov | Portfolio</title>
    <link rel="stylesheet" href="css/normalize.css">
    <link href='http://fonts.googleapis.com/css?family=Roboto+Condensed:400italic,400|Open+Sans+Condensed:300,700' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" href="css/main.css">
  </head>

I see that you posted a new question so I'll try to help you over there.

make sure you have <!DOCTYPE html> <html> before the <head></head> ?