4px to rem
4 pixels expressed in rem, the unit that scales when a user changes their browser's font size.
4px=0.25rem
4 ÷ 16 = 0.25 — rem is just pixels divided by the root font size, which defaults to 16px.
| root size | 4px in rem |
|---|---|
| 14px | 0.2857rem |
| 16px | 0.25rem |
| 18px | 0.2222rem |
| 20px | 0.2rem |
Different value? Use the converter.