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.

CSS CSS Foundations The Box Model The CSS Box Model Concept


What is wrong in the Box model - first code challenge? I use this code and it does not work for the margin...did I make a mistake?

div { padding: 20px 40px; border: 5px solid; margin-top: 50px; }

3 Answers

James Barnett
James Barnett
39,199 Points

Add a padding of 20px to the top and bottom of the div with the class box. Then, add 40 pixels of padding to the left and right sides.

Your selector isn't using the specified class.

Many thanks!! :)

Thanks but doesnt work - it wants "add a top margin of 50px" to the div...its in the Front end development/CSS/Box model....section....

OK Solved....few steps before I went with div / but should have gove with the class name of the div...THX anyways :)