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 trialJeffrey Cunningham
5,592 PointsMargin rule turns blue and doesn't work
My margin: 0 auto; rule was working but then I must have changed something that made it stop working. Now it is blue and will not work. This is my current code
a {
text-decoration: none;
}
#wrapper {
max-width: 940px
margin: 0 auto;
padding: 0 5%;
background: orange;
}
Workspaces does not even recognize margin as an option when I type ma...ect.
3 Answers
Falk Schwiefert
8,706 PointsYou are missing the semicolon after: max-width: 940px.
Basically the browser does not know that the command is done and tries to understand max-width: 940pxmargin: 0 auto;. Since that doesn't make any sense to the interpreter it ignores it. Placing the semicolon should get your code working again.
Jeffrey Cunningham
5,592 PointsOMG thank you. I don't know how I missed that.
Falk Schwiefert
8,706 PointsHaha, it happens. Easy and often. Braces, commas and semicolons have a way of disappearing on you. :)
If the solution helped make sure to mark the question as answered. :)