Relative to the font-size of the parent element (2em means 2 times the size of the parent font-size). We should be careful when we use
em
because if we have 3 containers nested inside of each other with
2em
, then the child element will have 8 times more font-size than it's grand parent container (it means they cascade)
https://www.w3schools.com/cssref/tryit.asp?filename=trycss_unit_em
https://youtu.be/-GR52czEd-0?t=279
by Valeri Tandilashvili
4 years ago
CSS
measurement units
CSS Units
2
Pro tip: use ```triple backticks around text``` to write in code fences