ReDsgn

Calculating ems

by Paul Boutin on Nov.15, 2008, under CSS, XHTML

This isn’t the actual way ems are measured in typography, Most browsers assume 1 em is equal to the calculated font size. For example, if the base font was 11px, then 1em would be 11px, 2em = 22px, etc.

As an example, set a div font size to 10px (use a contrasting background color), zero out the border and padding, and then set the width to 100em. It should equal 1000px exactly.

The accurate method to convert a true typographic em is to use a capitol M’s width to calculate the em size. It’s the same method for calculating the en and ex units. Most browsers just treat en and ex as one-half em.

calculated: 1em == 2en == 2ex

:,
No comments for this entry yet...

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Find me here!

Social media sites...

Archives

All entries, chronologically...