|
fiachra -> RE: Another reason why you should use EM or Percentages (12/4/2003 11:32:56)
|
As the gorillas are not going to be around for a hell of a long time, if at all, I'll give a "brief" reply to tinaalice. The advantage to using ems and percentages (they are effectively the same thing) is that a site will scale according to the users preferences automatically. Px refers to pixelsize which means you've already made things pretty near illegible for those who use macs. Pt is a printing measure - and how on god's green earth it ever snuck into web measurements is something I'll never understand. IOW Em's and percentages make everything much easier: easier for site authors doing markup, easier for site managers or those who have to alter original code, easier for designers, and much much more importantly easier for users of all browsers, ranging from pc screens to palm pilots to speech synthesizers to projectors. The user only has to specify one thing: the font size (1 em) in their browser and everything else scales automatically from that according to specifications in the css. Fine print can be 0.8em, or 0.6em, or 1em italic, or whatever you like ditto headings, indents, leading, etc. quote:
can't relate it to 10 or 12 points that being the size (12) I'm comformatble reading .. Don't think I'm getting at you when I say this but what you're comfortable reading isn't really the issue - it's what your visitors are comfortable reading that's more important. Incidentally more than 10% of the male poplulation in the western world suffer from some form of severe visual deficiency. Sit down and think about that number - it's an awful lot of people to not cater for. As for nn4.7x it has even worse css support than ie4.0 does. Unless a very large percentage of your visitors are scientific, technical, military, or government then you can probably safely ignore it. If you can'y simply ignore it then use @import as specified and written about elswhere on this forum by one of my colleagues in the gorilla group to serve something that nn4.x will understand and force it to ignore everything else. http://style.cleverchimp.com/font_size/scale/ for an example Here's some sample code to mess with p { font-size:0.9em; } td, th { font-size:0.7em; } h1 { font-size:200%; } h2 { font-size:170%; } h3 { font-size:140%; } h4 { font-size:120%; } Just remember that the cascade involves inheritance and that .9 of .9 is .81 to avoid problems you'll also have probles is you specify 50% of 50% for the same reason. http://www.w3.org/WAI/GL/css2em.htm http://www.w3schools.com/css/ http://www.w3schools.com/css/tryit.asp?filename=trycss_font-size of course there's always www.google.com as well [;)]
|
|
|
|