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

Oliver Sewell
Oliver Sewell
16,108 Points

My background color wont turn orange when i apply css rule

the max width and margin work but not the background color

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

i have also used background-color:orange; with no luck.

Agustin Grube
Agustin Grube
39,278 Points

background-color: orange;

is correct. The code challenges here are somewhat specific. Try adding the space between : and o

You are on the right track it should be background-color:orange;

Oliver Sewell
Oliver Sewell
16,108 Points

thankyou for the reply , its still not working T__T im using chrome , maybe their is something wrong with my browser or html code? the background will not change from white

Agustin Grube
Agustin Grube
39,278 Points

Did you erase the previous work? it all has to be there to move forward.

Oliver Sewell
Oliver Sewell
16,108 Points

yes i removed previous and retyped it it just isnt changing even when i try a different color also

Agustin Grube
Agustin Grube
39,278 Points

No. I mean did you delete the code from the previous stage of the challenge?

5 Answers

Oliver Sewell
Oliver Sewell
16,108 Points

yeah it still isnt working ive moved onto another task now and still having problems so ive emailed support . thanks for trying to help anyway dude

I'm having the same problem. My CSS just isn't being applied. I have everything exactly how Nick has it in the video. Using Chrome on Windows. Let me know if you get an answer!

Kristopher Van Sant
PLUS
Kristopher Van Sant
Courses Plus Student 18,830 Points

Are you trying to pass the challenge or are you following along with the video in workspaces? If you are in workspaces, this might sound silly, but are you saving your code in workspaces and refreshing the browser? Also have you changed any of the HTML?

Oliver Sewell
Oliver Sewell
16,108 Points

im following along with the video in workspaces , yeah i keep saving my work and havn't changed any of the html , iv emailed support to see if they can help , thankyou for replies and trying to help

Oliver Sewell
Oliver Sewell
16,108 Points

i still havnt figured out how to fix it either johnnie hicks , ive emailed the treehouse support and they said to post it on the forum but ive tried that and nothing is working , its really frustrating

I am frustrated as well, Oliver. It's good to know I'm not alone. I tried closing and re-opening my workspace, but that just lost all the work I have done today even though it appeared saved. So maybe copy all your code and save it offline just in case.

I managed to get mine working. After closing the workspace and opening it back up to find it hadn't saved anything from today, I rewrote everything and hit preview. Still wasn't working. Hit a hard refresh and it finally worked. So, some of the other solutions posted worked in the end, but there must be something wrong with leaving your workspace open overnight as I did.

Oliver Sewell
Oliver Sewell
16,108 Points

thats great news , goodluck hope it doesnt happen again im still trying to get mine to work

Good luck, friend. Hopefully we don't have to run into eachother in these forums too often