This calculator converts pixels to the CSS unit REM. The conversion is based on the default font-size
of 16px
.
The conversion works of course in both directions, just change the opposite input field.
So if we take the default size as an example, then 1px
represents 0.0625rem
and, in the other direction, 1rem
represents 16px
.
Inside a single document, the length of a REM unit is everywhere the same, it can just differ between documents. EM on the other side can differ between every element, because it is relative to the elements own font-size
(excpetion is the font-size
itself, in it EM is relative to the parent).
REM is the newer unit, older browsers don't support it.