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 trialGian Nicola Caggiano
11,898 PointsPadding and margin values
Hi! Why you sets the body padding value to 2.95em? (and also the margin-bottom of the headings)
Thanks
2 Answers
Andrew McCormick
17,730 Pointsthose were the values (I'm assuming he had determined this ahead of time to save time in the video) needed to align the content with the baselines.
Gian Nicola Caggiano
11,898 Pointsok, but according to which mathematical formula he added the 2.95em size?
Andrew McCormick
17,730 Pointssince the margin and padding were already in ems, I don't think there's a mathematical formula used. I'm sure it was educatedGuess + trial + error = success . In other words, he probably manually changed the values till he got it right.
However, I will defer to Guil Hernandez for the official answer.