CSS CSS Basics The Box Model Margins

Zijun Liao
Zijun Liao
13,409 Points

I am confused about the margin-bottom attribute

I am confused about the margin-bottom attribute at 3:58, Guil says 26px, and 1em equals to 16px, why not set the margin-bottom to 1.625em /* 26px / 16px*/

Cheers

2 Answers

Zijun Liao
Zijun Liao
13,409 Points

Just review the previous video, An em is equal to the current font-size.

Kyle Hartigan
Kyle Hartigan
16,463 Points

Hi Zijun,

You are correct. EM's are a scalable unit relative to font-size, where as pixels are fixed.