A clear answer. Here’s how.
One rem equals the root element’s computed font size. The default assumption is 16 CSS pixels, but users and styles can change it. This does not convert physical screen pixels.
See a worked example
Worked example
A fixed demonstration, separate from the values you enter above.
- Size to convert
- 24
- Root font size (px)
- 16
- Direction
- Pixels → rem
Example result
1.5 rem