Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS CSS Basics (2014) The Box Model Padding, Borders, and Margins

Create a new rule that targets the primary-content class. Add a padding property that sets the top padding to 25 pixels

how

1 Answer

.primary-content {padding-top:25px;}

/* OR */

.primary-content {padding:25px 0 0 0;}

The .primary-content bit targets the class primary-content and then you can either do padding-top:25px; if you just want to select the padding-top or you can do it a bit shorthand and do padding:25px 0 0 0 (you can even take the last 0 off). The four sets of numbers mean the four sides of the box, starting with the top then going right, bottom, left.