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

code wrong

wrapper{ max-width:940px;margine: center;} what is the wrong of code

4 Answers

You can center block-level elements by using:

margin: 0 auto;

You can read more about how margin: auto works here: http://learnlayout.com/margin-auto.html

wrapper{ max-width:940px;margin: center;} // Your spelled "margin" wrong.

Also, I don't think that margin: center is a thing. What is it that you are trying to do?

You are right margin: center is not a thing.

source: http://www.htmldog.com/reference/cssproperties/margin/

thanks

thank you for MR.James and Prian but that not meaning you laugh on my question it is important for me because i am begening and you in a high level it is not important

nahed abdelhalim -

You are correct it is important to start with a solid foundation. Spelling properties correctly and using the correct attribute for a property is an important skill for a person starting out learning CSS.

Nahed, I apologize if it appeared that I was laughing at your question. I was not. It's great that you are here learning. Please ask any and all questions that you can come up with.