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 Style the Basic Elements

My max-with code looks fine but i am still told there is something wrong. max-width: 940px;

I can't get past this code challenge because I am being told my max width is wrong.

css/main.css
a {
  text-decoration: none
}

<div>
#wrapper {
    max-width: 940px
    margin: 0 auto
}

missing semi-colons at the end of each line. max-width: 940px;

5 Answers

I had tried the semi colons before and tried them again and am still getting the error. <div>

wrapper {

max-width: 940px; margin: 0 auto; } </div>

try keeping the semi-colons and removing the div

I am not sure what you mean. I am typing in the code exactly like in the video which i have watched 4 times now and i need to move on, this is taking too much time, my code is correct. Who at treehouse can get me past this code sequence quiz?

<div>

wrapper {

max-width: 940px; margin: 0 auto; } </div>

James Home
James Home
12,011 Points

You should look into methods that will increasing your learning efficiency, try doing the examples in Workspaces and take notes as he talks.

You are missing the id (#) in your last paste.

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

Ok thanks the # has been in the code sequence answer the entire time, that is not the issue. The code is correct, the Treehouse "check" is not reading it correctly.

James Home
James Home
12,011 Points

I really doubt that Treehouse check is incorrect unless your connection is intermittent and it is failing to send. There aren't many different ways you can code this. What code challenge is this? Tell me and I will go through it myself.

Try coming out of the code challenge and submitting it again:

a {
  text-decoration: none;
}

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

Removing the <div> tag worked, that was painful. Thanks for your help