-
Using EM as your font measurement
Date: Oct 26, 2010 | Categories: Css | Written By: Mike Ballan
Recently I had to build a website that used EM’s rather than PX and I have to say I prefer the PX route as it makes more since in my head, that was until I found out this handy little trick for working out EM’s as PX.
Simply make your body font size 62.5% like the example below:
body { font-size: 62.5%; }
And now by magic this means that if you had a font size of say 1em that now works out to be the same size as 10px, which means 1.2em is the same as 12px and 2.0em is 20px.
Tags: EM | Fonts