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

CSS

The CSS Box Model Concept

Next, add a top margin of 50px.

margin-top: 50px;

wont work somebody please help

5 Answers

That looks fine. Could you display the rest of your code and a link to the code challenge so we can help.

Thanks 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

The code you showed me worked fine when I took the test. maybe you should try again?

Didn't work until i signed out and back in

Thanks for the help

No problem. Glad you got it working!

I had the same problem. Logging out and back in again seemed to fix it.

I'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;
      }

You need to select the div with the class of 'box'.

Got it! Thanks Elliott - not sure how I missed that! :)

Why 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.

the 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 }

I'm waiting for an answer for Tim's question :)