Re: Using em in CSS

>From: "Mjumbe Ukweli" <mjumbewu@hotmail.com>
>Reply-To: mjumbe@electricstoat.com
>To: rllrgrrl@hotmail.com, www-style@w3.org
>Subject: Re: Using em in CSS
>Date: Mon, 02 Jul 2001 00:15:09 -0400

>an 'em' in any given element is relative to the font-size of the element's
>parent.  if an element has a font-size of .5em and a child of thet element
>also has a font-size of .5em then the child's font-size will actually be
>.25em of the root font-size.  it's crazy.

Cool, this is exactly what I needed to know.

I was really hoping it would be as you said and be relative to just the 
users font size. Otherwise if you have anything nested, it'll get smaller 
and smaller!

boy, when you get past the basics, it really does get harder and harder to 
actually use this stuff correctly.

I just had a panic that maybe where I had used a table inside another table 
would go like that and it doesn't. I think tables have a seperate 
inheritance system with this. I think divs inherit size as you say but 
tables don't. I set td, th {font-size:0.8em} but the nested table had the 
same size text as the one it was nested in. But when i set 0.8em on body and 
then also on a div the div text went tiny.

I guess i'll just have to experiment more and work out how the browsers 
misinterpret the CSS. Though at this stage I would say the only sizes you'd 
need to set are body,td,th (or leave them as 1em) Headings, and any small 
text.

Kim
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Received on Monday, 2 July 2001 00:43:46 UTC