PX to EM Converter
About
em is relative to the CURRENT element's font size, which compounds through nesting — the property that makes em powerful for component-internal spacing (padding that scales with the component's own text) and treacherous for font-size itself. This converter uses the parent font size you supply as the base; check what the parent actually computes to before trusting it deep in a tree.
Frequently Asked Questions
Why is the default base 16?
Every major browser ships with a 16px default root font size; designs and frameworks (Tailwind's spacing scale among them) assume it unless the user or the CSS changes it.
Should I use px or relative units?
Relative units (rem for layout, em for component internals) respect user font preferences — an accessibility requirement in most guidelines. px survives for hairline borders and fixed media.