css em messurment for tracking and kerning
Friday, October 31st, 2008First off, if you don’t know, kerning is defining the space between two letters. Tracking is defining the space between all letters in a line. And finally, the em (pronounced as if you were to say the letter ‘m’, I was just saying E M for a while) space measurement is exactly that, it is the space taken up by the letter m in that particular font. It’s a very relative measurement.
Here’s a conversion table to help explain.
Seems like splitting hairs doesn’t it? I’ll explain.
If you have css code that specifies the letter spacing in px. Your letters will always be that many pixels apart from each other.
-
-
p {
-
letter-spacing: .1em;
-
}
If you spicify a certain amount of em space, they will expand proportionally as the user makes the text bigger. So in theory, the page and text will look exactly the same no matter how big it is, assuming you are dynamically resizing your divs (or tables).
I personally prefer to use pixel measurements and restrict the user’s ability to re size the text on the page. Nevertheless, when interacting with design folks who are involved in predominantly print media, you’ll run into these and you’ll need to know how to apply them to the web.