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 trialAdrian Thomas
Courses Plus Student 998 PointsAdd 10px of padding to the top and bottom of the copyright, with no padding on the left or right.
I put #copyright{ padding: 10px 10px 0 0;} but my code is completely wrong I guess. How do you know which is the top and bottom?
2 Answers
Matthew Mascioni
20,444 PointsHi Adrian,
The padding and margin shorthands have the same kind of syntax for which one gets applied to top, left, bottom and right, for example with margin:
margin: top right bottom left;
Want to know an easy way to remember this? Top Right Bottom Left. Just think, if you don't use that shorthand, you'll be in TRBL!
(cheesy, I know)
Pete Yurchision
1,402 PointsYou can also use a shortcut of
margin: 10px 0;
This would be 10px top and bottom, 0px left and right.
James Barnett
39,199 PointsPete Yurchision - You may have noticed that Matthew Mascioni's answer didn't give any cut/paste code, that was by design.
Here on the forum we try to give help not answers.
James Barnett
39,199 PointsJames Barnett
39,199 Points>
Want to know an easy way to remember this?It goes clockwise