RE: Relative Font Size

You can still get into inheritance issues, in exactly the same way as
when you specify everything in ems or percentages. It's a valid method,
and I often use something similar, but there really is no advantage over
going all ems in terms of inheritance issues.

Inheritance issues - in my experience - arise mainly due to
(unnecessarily) complex nested markup and styling (and also, what I have
often seen, "overloading" - not sure if that could be the correct term -
stylesheets, e.g. html,body,p,td,strong,em { font-size: 0.95em; }, where
you would obviously end up with quite obvious problems, such as a strong
elements in a paragraph, which happens to be inside a table, ending up
with 0.95 * 0.95 * 0.95 * 0.95 = ~0.8145em  ) 

Your example could be styled like this:

body	{ font-size: 0.95em; }
h1	{ font-size: 1.3em; }
h2	{ font-size: 1.2em; }

and achieve exactly the same as with percentages.

Patrick
________________________________
Patrick H. Lauke
Webmaster / University of Salford
http://www.salford.ac.uk


> -----Original Message-----
> From: Matthew Ogston [mailto:matthewogston@hotmail.com]
> Sent: 18 June 2003 10:58
> To: w3c-wai-ig@w3.org
> Subject: Re: Relative Font Size
> 
> 
> 
> 
> 
> Just an idea, why not specify the font size as 'em' when 
> redefining the 
> <body> tag in the stylesheet (maybe set as 0.95em) and then 
> setting the size 
> of all other text as a % of this (is this method valid?).
> 
> For example, the <h1> could be set to have a font size of 130% of the 
> default font size, <h2> set as 120% etc. Smaller text where 
> needed could be 
> set to something like 90% etc.
> 
> This may get rid of the inheritance issues. Thoughts?
> 
> 
> 
> 
> 
> 
> >From: "Eileen O'Brien" <eobrien@hubbardone.com>
> >To: <w3c-wai-ig@w3.org>
> >Subject: Relative Font Size
> >Date: Tue, 17 Jun 2003 10:20:08 -0500
> >
> >When using relative font sizes in style sheets, I'm 
> wondering if it's more 
> >preferable to use the "em" unit rather and percentages.  W3C 
> seems to 
> >recommend the "em" unit, but I'm curious if percentages are ok?
> >
> >------------------
> >for example:
> >
> >.body   {FONT-SIZE: 70%;FONT-FAMILY:verdana,arial;color:#000000;}
> >
> >vs.
> >
> >.body   {FONT-SIZE: .75em;FONT-FAMILY:verdana,arial;color:#000000;}
> >----------------
> >
> >
> >Thanks!
> >Eileen
> >
> >
> >Eileen O'Brien
> >Hubbard|One
> >p: 312.939.5000 x 223
> >e:  <mailto:eobrien@hubbardone.com> eobrien@hubbardone.com
> >
> 
> _________________________________________________________________
> Get Hotmail on your mobile phone http://www.msn.co.uk/msnmobile
> 
> 

Received on Wednesday, 18 June 2003 06:26:28 UTC