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 trial

CSS CSS Foundations Web Typography Responsive Text and Vertical Rhythm: Part 2

Gian Nicola Caggiano
Gian Nicola Caggiano
11,898 Points

Padding 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
Andrew McCormick
17,730 Points

those 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
Gian Nicola Caggiano
11,898 Points

ok, but according to which mathematical formula he added the 2.95em size?

Andrew McCormick
Andrew McCormick
17,730 Points

since 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.