Discussion in 'HTML Basics' started by Gavin, Mar 17, 2007.
In your opinion when doing CSS is it better to use % or pixel for the font size?
i think font-size is better, you never know what resolution screen people have and it might be too big or too small.
That's what I was thinking. Thanks for clearing that up for me and thankfully I am using pixel size already.
well I use %
usually set it at 80% as a default - works fine
I'd have thought that percentages were better or maybe pixels (trying to remember what CSS I learnt ... )
From memory the font size differs depending on the OS...
Of course I could be completely wrong
I still think the pixel is the best:
Using Points, Pixels, Ems, or Percentages for CSS Fonts
You should use em when setting font-size, don't force people to read text as you prefer it to be.
I set a percentage font-size in the html/body section. (A percentage of the browser default which should be 16px if I remember) and then ems after that.
IE7 now respects user increases in the text sizes along with the other browsers so it should not be such a problem to use px sizes anymore.
I usually use pixels but em is best/recommended (as mentioned) as it allows users to resize the text.
Sound advice There was an article on ALA about this but i can't find it.
Yeah, I probably picked it up from that article.
To simplify calculating the relevant figures for the typographic scale I use rem sizing. I also find Tim Brown's Modular Scale invaluable.
I use pixels, sometimes %.
Separate names with a comma.