On 05/10/08 09:55 am, shapper wrote:
All them say to use em ... ok that is what I use. But then they differ
on the text size "initialization ".
A recent version:
html, body {font-size: 1em;}
Another one:
body {font-size: 100%}
100% has been preferred because of some odd problem IE6 has with font
sizing using ems. That is becoming less of an issue as IE6 is phased out.
Another one:
body { font-size: 62.5%; }
Ridiculously small. Only if you do not want anyone to read the content.
Or only those with excellent eyesight 1 foot (30 cm) from the monitor.
And yet another one:
html { font-size: 100%; }
body { font-size: 50%; }
50% is absurdly small. Unless the visitor has a 24" (61 cm) monitor at
800x600 resolution.
Which one should I use? Why is there so many approaches?
100% or 1em should be the basic content font size. It is presumed the
visitor has a clue about their browser options and knows how to set the
default font size to suit their needs and taste.
Ems are a "fixed" method of setting the font size. Regardless of the
current context, 1.5em results in a 1.5em font size.
Percentage allows a scaling of the size based on the current context.
If, say, a div is set for font-size:1.5em and a <phas a style of
font-size:85%, the displayed font-size is 1.5 * 0.85 = 1.275 em. For a
context where the font size is 0.8 em, the the same <pshows 0.68 em.
--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)