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 Basics (2014) The Box Model Margins

What's the logic of defining the margin-bottom at 3:45 based on font-size?

I get that he's dividing the desired margin of 26px by the h2 font-size in pixels of 53px... my question is... why? Like, I thought we were just doing division to calculate different em values for different sizes for different fonts. But here he's using it for margin-bottom? Margin-bottom is not a font. It's like we went from font / font to margin-bottom / font. Margin-bottom seems like a completely different thing.

1 Answer

Hello

The font size is the base size used for responsive behaviors. Its a general rule where everything will be responsive to one value to allow for expected responsive results.

So think of it as a value that you can set for everything on your page too, rather than what property it belongs to.

confused about em