To convert px to rem, you should know the total size of 1 REM, which is by default 16px.
Then, apply the formula:
For example, with 16px as the size of 1rem, 32px will be converted to:
px / rem
.For example, with 16px as the size of 1rem, 32px will be converted to:
32 / 16 = 2rem
.