Linked by Thom Holwerda on Sun 5th Oct 2008 15:57 UTC
Thread beginning with comment 332493
To view parent comment, click here.
To read all comments associated with this story, please click here.
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[6]: Comment by sbergman27
by Ford Prefect on Mon 6th Oct 2008 00:48
in reply to "RE[5]: Comment by sbergman27"
You are not completely right here.
Absolute values like px or pt overwrite inherited values, yes. But em is a relative value. It is dependent on the inherited font size (1em == the width of letter 'm'). Therefor, indeed another shrink happens, as sbergman assumed.
I also want to add that px is not, as you claim, the right unit for font sizes, even if you want to give a fixed font size. You should instead use pt, which at least (while not following the user's preference for base font size) respects the screen's DPI.
RE[7]: Comment by sbergman27
by google_ninja on Mon 6th Oct 2008 01:53
in reply to "RE[6]: Comment by sbergman27"
Absolute values like px or pt overwrite inherited values, yes. But em is a relative value. It is dependent on the inherited font size (1em == the width of letter 'm'). Therefor, indeed another shrink happens, as sbergman assumed.
You learn something new every day
I didn't realize that, and I fancy myself pretty good at css. I also want to add that px is not, as you claim, the right unit for font sizes, even if you want to give a fixed font size. You should instead use pt, which at least (while not following the user's preference for base font size) respects the screen's DPI.
The only problem with pt is if you are not using ubiquitous fonts like Arial or Helvetica. When the user fails over to another font, you could end up with a dramatically different looking page then what you want, as some fonts are bigger then others at the same pt.
This is all pretty academic anyways, since em is the correct unit in the overwhelming majority of cases. I would say though that in the odd case where you do need to override the users choices, chances are you will want to override their dpi choice too.






Member since:
2006-02-05
CSS gets overridden the lower you get. So if you have a style on the body and a style on an element, then element level will override the body level. If you are interest in this sort of stuff, I highly suggest firebug on FF, best web dev tool out there for CSS/JS.
Default config of FF3 on Vista is 16pt Times New Roman.
Like I said before though, if you are going for a fixed size, you should be using px, exactly for this reason. If you are going for a relative size, 81% is just silly, because you are deliberately saying "Make this smaller then what the user set as an ideal font size."
I'm not at all sure that this can be blamed on FreeType.
I'm not saying it is all freetypes fault. I have just noticed that reading MSDN stuff in particular on a default linux install is pretty much illegible, which is why I mentioned it.