DEV Community

Discussion on: Use em For Padding and Margin

Collapse
faradeifrontend profile image
Vladimir

i use REM + reset.

html {
font-size: 62.5%; // 10/16*100 = 10px
}

body {
font-size: 1.6rem; // = 16px
}

Collapse
datmt profile image
Mạnh Đạt Author

This is a common approach for setting font size. However, I'm talking about using em for margin and padding :)