I'm sorry David, I do not understand what you are saying here. Is the use of ems just a gimmick?
What has the margin size got to do with my question. I was asking about nested elements Regards Pete -----Original Message----- From: David Laakso [mailto:[EMAIL PROTECTED] Sent: 13 October 2007 16:38 To: Pete Harrison Cc: css-d@lists.css-discuss.org Subject: Re: [css-d] Converting to EMs Pete Harrison wrote: > OK, I'm getting more savvy with CSS and feeling a lot more confident > with many thing I try. However, I've been looking at using EM as the > scaling factor for all my fonts and pictures for accessibility reasons. > > I must admit, it all seems a little difficult, especially when it > comes to nested elements. If I have got this right, to simulate the > following; > > H1=24px > H2=18px > P=12px > > I would do the following > > body {font-size:62.5%;} > H1 (font-size:2.4em;} > H2 (font-size:1.8em;} > P (font-size:1.2em} > > However, is I have a div like #frontpagenews {font-size:2em;} with a > nested h2, the h2 would seem like it was 9px (using child*parent i.e. > 1.8*2=3.6em/36px > > So I would have to change all em sizes of all nested elements if I had > to make a change to just one parent! > > I think this is a ridiculous this to have to do so I must have got it > all wrong. > > Please help > > Regards > Pete > > It does not take an advanced degree in mathematics to make words readable on the screen. The method you are using is one of many such "gimmicks" and while interesting they seldom deliver as promoted and are known to fail user stress testing. This works well across-browser when setting fonts in em: html { font-size : 100%; } <!--- user default set in percent to squelch a font-scaling bug when using em in ie body { font-size : 1em; } <!--- user default set in em h1 { font-size: whatever em; } <!--- title font-size layout dependent h2 { font-size: whatever em; } <!--- sub-title font-size layout dependent #primary-content p {margin : something or other; } <!--- primary content inherits user default font-size Best, ~dL -- http://chelseacreekstudio.com/ ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/