Hi,
I would like to open a discussion about the difficult question of length units.
I’m a big fan of the "point" unit for the font size, because it is a physical unit (about 0.3mm) and ensures the text being displayed in an acceptable size regardless the screen resolution. On the contrary, specifying font size in pixel can lead to excessively small texts on high resolution screens.
For the size of other elements, like the width of <div> blocks, I generally use pixels.
Now, assume you have a text which size is given in points inside a <div> which width is specified in pixels. It can display well on your screen, but if someone else is viewing the same page on a high resolution screen, the <div> could be not large enough to display the text like you want. This is especially true if inside that <div> are several "float:right" and "float:left" elements that you hope to display on the same "row".
As I’m using physical units for fonts, I have considered also using such units for other elements.
The code below displays as a square which side is 62 mm long when measured with a ruler on my screen (Windows OS, 15’’, 1024x768 resol).
<div style="width:50mm;height:50mm;border:1px solid black"> </div>
This is because, with computers, mm and cm are not true physical units but logical units.
I assume that if specifiying sizes in mm or cm, things display differently for Macintosh users as the screen ppi is different.
Would the solution be using the physical "pt" exclusively ?
On the contrary, the author of this page recommends not using "pt" for font sizes
http://hsivonen.iki.fi/units/
Which is to you think the best approach to get more or less similar layout on all operating systems and screen resolutions ?
The most important for me is not that elements displays exactly the same absolute size on every system, but that the relative sizes are respected. However, as explained above, the all-in-pixel approach is not my favorite one because screen resolutions may vary a lot and make text hard to read.
Thanks for sharing your opinion.