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

What 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

You 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; }

div{ 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.

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

What is the code challenge? Send the link and I will have a look if you like?

Oh I see... Thanks!