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

Orange Background

The background color will not change to orange inside of my wrapper.

5 Answers

The way you comment in CSS is using /* comments here */. You're actually using the method for commenting in HTML. Just change that up and it should work fine.

a {
  text-decoration: none; /* gets rid of underlines on links */
}

#wrapper {
  max-width: 940px; /* want the width to be no larger than 940px across */
  margin: 0 auto; /* sets margin or spacing around element */
  padding: 0 5%; /* spacing around words; 0 padding on top and bottom, 5% padding to left and right sides of element */
  background: orange; /* orange background */
}

a <!-- gets rid of underlines on links--> { text-decoration: none; }

wrapper

{ max-width: 940px; <!-- want the width to be no larger than 940px across--> margin: 0 auto; <!-- sets margin or spacing around element--> padding: 0 5%; <!--spacing around words; 0 padding on top and bottom, 5% padding to left and right sides of element--> background: orange; }

It's always helpful if you can post your code but below is what you should have.

a {
  text-decoration: none;
}

#wrapper {
  max-width: 940px;
  margin: 0 auto;
  padding: 0 5%;
  background: orange;
}

I have that exact code and the background color still will not change:

a <!-- gets rid of underlines on links-->
{
  text-decoration: none;
}

#wrapper 
{
  max-width: 940px; <!-- want the width to be no larger than 940px across-->
  margin: 0 auto; <!-- sets margin or spacing around element-->
  padding: 0 5%; <!--spacing around words; 0 padding on top and bottom, 5% padding to left and right sides of element-->
  background: orange;
}

Hey Summer,

Post your code in the forum so we can see what's going on. In order to post your code all you need to do is put three back ticks before and after your code snippet. Like this:

h2 {
color: green;
font-size: 20px;
}

Hi Matt, I just posted it above!

thank you!!