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 trialbaderbouta
7,804 PointsAt 4:50, how and why does the picture 'scale' a little smaller?
How does the picture scale a little smaller?
1 Answer
Adam Pengh
29,881 Points@baderbouta Since the image is inside of another element, when the instructor adds padding this forces the space available for the image to decrease by 10 on all sides. It has to do with the basic box model for CSS. Margin is outside the box, so margin creates space around the element, while padding is inside the box, so it forces the content within the element (the image) to shrink.
baderbouta
7,804 Pointsbaderbouta
7,804 PointsGotcha! Thanks a lot!