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 trialangiejang
3,134 PointsWhy is it necessary to use em for the height of padding but % for the width of padding...?
Why is it necessary to use em for the height of padding but % for the width of padding...?
1 Answer
Steven Parker
231,184 PointsIt's not necessary, but it's a common design decision. Having the vertical space be relative to the font instead of the window size can make the appearance seem more consistent across different screens. But in the horizontal dimension, making the space relative to the width can look better and make better use of smaller screens.
But as a designer, you can choose differently if you think it looks better another way.