Difference between em and rem
All I need to know:
em units for the font-size property will be relative to the font-size of the parent element. em units on other properties than font-size will be relative to the font-size of the current element. rem units sizes will always be relative to the font-size of the root html element.1
References
Digital Ocean. “CSS rem vs em Units in CSS.” September 2, 2020. https://www.digitalocean.com/community/tutorials/css-rem-vs-em-unitshttps://www.digitalocean.com/community/tutorials/css-rem-vs-em-units
-
Digital Ocean, “CSS rem vs em Units in CSS”, September 3, 2020, https://www.digitalocean.com/community/tutorials/css-rem-vs-em-unitshttps://www.digitalocean.com/community/tutorials/css-rem-vs-em-units ↩︎