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
Khalif Chestnut
13,845 PointsThe CSS Box Model Concept
Next, add a top margin of 50px.
margin-top: 50px;
wont work somebody please help
5 Answers
Elliott Frazier
Courses Plus Student 9,647 PointsThat looks fine. Could you display the rest of your code and a link to the code challenge so we can help.
Khalif Chestnut
13,845 PointsThanks for your help
heres my code
.box{ padding: 20px 40px; border-style: solid; border-width: 5px; margin-top: 50px; }
and heres the link https://teamtreehouse.com/forum/the-css-box-model-concept-3
Khalif Chestnut
13,845 PointsOops wrong link http://teamtreehouse.com/library/the-css-box-model-concept-2
Elliott Frazier
Courses Plus Student 9,647 PointsThe code you showed me worked fine when I took the test. maybe you should try again?
Khalif Chestnut
13,845 PointsDidn't work until i signed out and back in
Thanks for the help
Elliott Frazier
Courses Plus Student 9,647 PointsNo problem. Glad you got it working!
Bragi Þór Antoníusson
2,324 PointsI had the same problem. Logging out and back in again seemed to fix it.
Keith Armstrong
Courses Plus Student 1,266 PointsI've logged out twice and am still not able to pass. I am using the code snippet below.
div {
padding: 20px 40px 20px 40px;
border: 5px solid;
margin-top: 50px;
}
Elliott Frazier
Courses Plus Student 9,647 PointsYou need to select the div with the class of 'box'.
Keith Armstrong
Courses Plus Student 1,266 PointsGot it! Thanks Elliott - not sure how I missed that! :)
Tim Keefe
7,273 PointsWhy does this happen?
div { padding: 20px 40px; border: 5 px solid } passes challenge part 1 and 2.
But on part 3 using this fails.... div { padding: 20px 40px; border: 5 px solid margin-top: 50px }
In order to pass Part 3 it requires that you use the div's class name, which is .box. .box { padding: 20px 40px; border: 5 px solid margin-top: 50px }
It's the only <div> in the html too. So why does it matter? Thanks.
Tim Keefe
7,273 Pointsthe part 3 div{} code displayed above was missing the ";" after solid. corrected code, which still doesn't pass.
div { padding: 20px 40px; border: 5 px solid; margin-top: 50px }
alfa Wesley
4,691 PointsI'm waiting for an answer for Tim's question :)