On 19/04/2014 22:56, Tedd Sperling wrote:
On Apr 19, 2014, at 4:19 PM, Tim Dawson <t...@ramasaig.com> wrote:

On 19/04/2014 15:00, Tedd Sperling wrote:
<I don't understand your statement "Obviously the em value has to be reduced as 
the
font-size increases, to get the same pixel equivalent.">
Given that my original margin/padding around an <h1> with font-size 250% was in 
pixels,
when I converted at 1 em = 16 px the new margin/padding sizes were 2.5 times 
too high. So
conversion for <h1> has to be 1 em = 40px to get the same on screen appearance. 
If that's
wrong I haven't understood ems at all.

That sounds confusing.
I don't see why. My understanding is that an 'em' originated as the width of 
the letter 'M' at
whatever font size is under consideration. It's a relative measure. So in a 
larger font size an
em must be larger, and therefore equivalent to more pixels than in a smaller 
font size.

I just set my <h?> to whatever size I want knowing that 1em is equal (in most 
cases) to 16
pixels. No need for percentages in setting font sizes.
If you set your font-sizes in ems then I think you are treating the em as a constant (normally 16px). Though I notice you actually use descriptive names such as 'xx-large' in at least some instances. I also spotted some margins and padding in px.

I've been reading http://webtypography.net/2.1.1 where there's a nice example (near the bottom of the page) of font-size set in pixels, where the em undoubtedly scales with font-size.

Possibly the same thing happens when font-sizes are expressed in %, so I'll have to try ems for font sizes instead.

Tim

--
Tim Dawson
Maolbhuidhe
Fionnphort
Isle of Mull  PA66 6BP

01681 700718
______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
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/

Reply via email to