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 trialPetr Klimeš
5,273 PointsMargin?
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
39,199 PointsAdd 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.
Petr Klimeš
5,273 PointsThanks but doesnt work - it wants "add a top margin of 50px" to the div...its in the Front end development/CSS/Box model....section....
Petr Klimeš
5,273 PointsOK Solved....few steps before I went with div / but should have gove with the class name of the div...THX anyways :)
Petr Klimeš
5,273 PointsPetr Klimeš
5,273 PointsMany thanks!! :)