Pete Harrison wrote: > Is the use of ems just a gimmick?
It depends. If you actually want to achieve pixel sizes using the em unit, then there is little point in it. You haven't described what you wish to achieve, so people might make some guesses. Anyway, using percentages is a little safer than using the em unit. Let's see your original question: >> If I have got this right, to simulate the >> following; >> >> H1=24px >> H2=18px >> P=12px In which sense would you want to simulate it? If you want to keep the relationships between the sizes the same but use adjustable sizes, then you would simply set h1 { font-size: 200%; } h2 { font-size: 150%; } and that's it. No reason to set size for p, since it defaults to the body element's font size. What you set for body is a different issue, and often debated, but not relevant to keeping the proportions the same. >> However, is I have a div like #frontpagenews {font-size:2em;} That's quite a big font size, but let's assume it. >> with a >> nested h2, the h2 would seem like it was 9px (using child*parent i.e. >> 1.8*2=3.6em/36px Pardon? I can't see where your calculations come from and why you divide ems by pixels. If you have an h2 inside #frontpagenews, then you just have to decide which font size you want for it. It's simple anyway: when setting in % (or em), you naturally need to take into account the enclosing element's font size, because that's what % (and em) is relative to. >> So I would have to change all em sizes of all nested elements if I >> had to make a change to just one parent! If you set a font size relative to an element's parent, then the size obviously changes if you change the parent's font size. But it doesn't generally change if you change another element's parent's font size. A wild guess: are you perhaps dealing with a problem that has a solution like #frontpagenews h2 {font-size: 120%;} or something like that? Jukka K. Korpela ("Yucca") http://www.cs.tut.fi/~jkorpela/ ______________________________________________________________________ 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/