Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.


Margin property in css

I changed the value of margin property to 90 and I found it is aligned to left and if I change furthur i cannot see difference. i am not able to understand why is this happening.Please help me on this behaviour. Thanks in advance.


max-width: 940px; margin : 90 auto; }

Jesus Mendoza
Jesus Mendoza
23,274 Points

You need to add a pixel, percentage, em property to 90

1 Answer

Erik McClintock
Erik McClintock
45,783 Points


Whenever you're assigning a value to something, make sure you include the type that you want to associate with that value. In this case, for example, you have:

wrapper {
    margin: 90 auto; /* what is 90? */

You would want something like this:

wrapper {
    margin: 90px auto; /* note that here, we specify that 90 is a pixel value by using "px" after it */