conversion of px to em, % and pt

JSFIDDLE: http://jsfiddle.net/jnelsonin/ctfy158o/

This simple formula will help you to convert a px value in CSS to corresponding em, % and pt.

consider we have a pixel value of 8. Based on the above formula,

pt = (8 * 3) / 4 = 6pt

em = 8 / 12 = 0.5em

% = 0.5 * 100 = 50%