Why does padding in em change if I change the font size of the container?
Because em units are relative to the element's own font size, changing the container's font size changes the padding size visually (see step 2).
💡 em units scale with the element's font size, so padding and margins using em grow or shrink if font size changes.
Why does 1rem always stay the same size even if I change the font size of a child element?
rem units always refer to the root font size, so they stay consistent regardless of where they are used (see step 3).
💡 Use rem for consistent sizing across the page, unaffected by nested font changes.
Why does width: 50% make the container half the browser width, not half the text size?
Percentages for width are relative to the parent element's width, not font size (see step 2).
💡 Percent units relate to container dimensions, not text size.