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 trialpat barosy
6,759 Points2 different values for padding in header and summary
Hello all,
Can anyone explain why Mattox uses both em & percentage values for the padding selector in header and summary classes?
1 Answer
Caroline Forslund
Front End Web Development Techdegree Graduate 36,096 PointsBecause you want more exact padding for the top and bottom while you want more fluid padding on the sides. The em value will be a fixed value dependant on the font size it's inheriting it from. The percentage will mean less padding on the sides the more narrow the view is. Hope that makes sense.
To learn more about em values you can watch this video: https://teamtreehouse.com/library/em-units