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
Rodrigo Chousal
16,009 PointsWhat is wrong in this line of code?
The instructions are: Next, add a top margin of 50px.
div{padding:20px 40px; border:5px; border-style:solid;margin-top:50px;}
6 Answers
Ashley Crossland
10,868 PointsYou needed to select the class box rather than the div, with the class selector '.box'
.box{ padding: 20px 40px; border-width:5px; border-style:solid; margin-top:50px; }
Ashley Crossland
10,868 Pointsdiv{ padding:20px 40px; border:5px; border-style:solid; margin:50px 0 0 0; }
There is nothing wrong with the code. Is it for a code challenge? You could try the above, it depends on what the code challenge is expecting really.
Rodrigo Chousal
16,009 PointsIt is for a code challenge. The line you gave me didn't work as well, I received the same message: Bummer! Check the top margin in your CSS.
Ashley Crossland
10,868 PointsWhat is the code challenge? Send the link and I will have a look if you like?
Rodrigo Chousal
16,009 PointsIt is the third challenge. http://teamtreehouse.com/library/css-foundations/the-box-model/the-css-box-model-concept
Rodrigo Chousal
16,009 PointsOh I see... Thanks!