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 Customizing Colors and Fonts Use Color in CSS

The background color would not change

Hi there, my background color does not change, can anybody help? Thanks in advance! :)

This is my css code: a {text-decoration:none}

wrapper {

max-width:940px; margin: 0 auto; padding:0 5%; }

logo {

text-align:center; margin=0; }

a { color:#7a4b8f }

header{ background:#7a4b8f }

footer{ background:#7a4b8f }

2 Answers

Louise Karlund
Louise Karlund
4,393 Points

Hi Nicole,

it looks as though you have some syntax issues.

There has to be a semi-colon ; after the value.

so if you want to change your background it should be:

header {
background: #7a4b8f ;
}

if you don't add the ; after the value the browser won't understand it and will just ignore it.

Liam English
Liam English
3,837 Points

Hi Nicole, as Louise has previously mentioned, you have some syntax issues in your CSS file.

Most of the issues are missing semi-colons at the end of your declarations. You have also missed out the # symbol that needs to be used in front of your selector ID's (wrapper and logo) - unless they have been omitted due to a comment format problem :).

a {
text-decoration:none ;
}

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

#logo {
text-align: center; 
margin=0; 
}

a { 
color: #7a4b8f ;
}

header{ 
background: #7a4b8f ;
}

footer{ 
background :#7a4b8f ;
}