View Single Post
Old 09-26-2012, 11:03 AM   #2
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: 5,789
Karma: 4027751
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon
It depends on what you want. Pixels are almost never a good choice, since they might depend on the device resolution (although strictly, the CSS spec gives them a sort of absolute meaning, but I wouldn't trust the reading applications to be aware of this).

If you want something to depend on the font size (probably indents or vertical spacing), use em.

If you want something to depend on the screen size (maybe some margins), use %; for relative font sizes you can use % too.

If you want something to have some absolute size (some other margins, or line widths, or picture size), use real units, like in or mm.

Whatever you do, you won't be able to "keep a proper layout wherever the app, support and user's preferences are", there will always be an app that messes everything, and users with extreme (or silly) preferences.
Jellby is offline   Reply With Quote