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 trialBreno Girafa
4,907 PointsAbout the 2.5% margin for the #gallery list items
Nick says that it will add 2.5% of margin space to both the left and right sides. But shouldn't it add 2.5% to both top and bottom as well since it's a short hand of the whole margin property (margin: top right bottom left;)?
4 Answers
Nick Pettit
Treehouse TeacherSorry, this was actually just slightly unclear wording. It will indeed add 2.5% margin to both the left and right sides. What I did not mention and probably should have, is that it will also add 2.5% margin to the top and bottom. The margins on the two sides are the more important part of the explanation though, so that's why I mentioned it.
Logan R
22,989 PointsYes, from what I saw, it should add 2.5% to top, bottom, left and right. You can easily solve this by doing:
margin: 0 2.5%;
This would be margin: top/bottom left/right;.
Breno Girafa
4,907 Pointssure sure. but my point is: why it didn't add 2,5% to top and bottom? It should right? He's declaring 2,5% to all sides but it didn't take effect on top and bottom.
Breno Girafa
4,907 PointsThanks Nick, that clarifies it all :)
and thanks L R for the quick response too.
now back to coding