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 trialMaxim Markov
4,330 PointsTrouble with max-width
This is the code I'm using in a code challenge to set the max width to 940 pixels and center it using the margin property. I got an error saying: "Check the max width value". Any ideas what I'm doing wrong? Thanks!
#wrapper {
max-width: 940px;
margin: 0 auto;
}
3 Answers
Adam Sackfield
Courses Plus Student 19,663 PointsMaxim Markov Your code is correct, try refreshing the browser sometimes they can lose the connection to the code engine and all sorts of crazy stuff can happen. :)
Rose Hurst
5,658 PointsWrapper is a class so it would need
.wrapper { }
Ugh, my apologies. I've forgotten if it was used as a class. I'd have to go back and take a look again at that challenge.
Maxim Markov
4,330 PointsI'm sorry, wrapper is actually an ID. I had #wrapper in my code, but just failed to copy and paste correctly.
Arnaud Kamtcheu
2,181 PointsHello, for the same challenge i noticed that if you put a space beween the property margin and the folowing colon ( : ) the compiler see this as an error. I think there is something wrong with the way that challenge is corrected.