CSS CSS Basics 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

Liam Clarke
MOD
Liam Clarke
Treehouse Moderator 19,724 Points

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