View Single Post
Old 02-15-2011, 04:35 AM   #26
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,557
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by cybmole View Post
how would you use .css styling to do that ( add 2 pixels between paragraphs )
p { margin-top: 2px }

Quote:
do you have to translate pixel measurements into pts or ems ?
No, you can use "px" in CSS.

Quote:
I've developed a sense of what 1 em looks like, have not mastered points yet, as I read somewhere the ems scale better with text & thus are a preferred option for ebook layouts
Points are an absolute unit of length, like millimeters or inches (1 pt = 1/72 in), as long as the renderer and the screen as properly set up. They don't change scale with anything, because a point is a point is a point, unless the renderer has some kind of magnification option.

Ems are font-dependent. If you change the font or the text size, an em changes too. Sometimes that's desirable, sometimes it's not.

Pixels are device-dependent. A pixel is a "point" in the screen (do not confuse with the above points), it's the minimal detail size for the screen. If you move to a screen with a different resolution, a pixel size will change. Sometimes that's desirable, sometimes it's not.
Jellby is offline   Reply With Quote