CSS

How to convert px to ems

Written by Ian Carnaghan · 8 sec read >

Use the following formula to calculate px’s to ems

1 ÷ browser default font size x pixels to convert

A browsers default font size ussually is 16px

so if you want to convert 12px’s to ems do the following

1 ÷ 16 x 12 = 0.75 ems

Last Updated On March 22, 2018
Written by Ian Carnaghan
I am a software developer and online educator who likes to keep up with all the latest in technology. I also manage cloud infrastructure, continuous monitoring, DevOps processes, security, and continuous integration and deployment. Profile

Leave a Reply

avatar
  Subscribe  
Notify of