ahem er em

Discussion in 'HTML' started by fritz, May 14, 2005.

  1. fritz

    fritz Guest

    Whoa! There's a new idea in town. At least for me. The em, which I see
    mentioned in a nearby post. The idea of using the em for text needs a
    little explanation. But first, on my own I found out that the em came
    from the idea of the size of a box that would enclose the Roman letter
    "M". (it was all caps long ago).

    Cutting to the chase: Is this right? By setting the basic font size to 1
    em then you merely use the css properties of 'small', 'x-large', etc to
    let the browser display it at it's best?

    F.
     
    fritz, May 14, 2005
    #1
    1. Advertising

  2. fritz

    Els Guest

    fritz wrote:

    > Whoa! There's a new idea in town. At least for me. The em, which I see
    > mentioned in a nearby post. The idea of using the em for text needs a
    > little explanation. But first, on my own I found out that the em came
    > from the idea of the size of a box that would enclose the Roman letter
    > "M". (it was all caps long ago).
    >
    > Cutting to the chase: Is this right? By setting the basic font size to 1
    > em then you merely use the css properties of 'small', 'x-large', etc to
    > let the browser display it at it's best?


    No, use percentage for the font-size itself, but use em if you need a
    box to be wide enough for a certain piece of text, so that the box
    grows with the font-size if visitors resize the text.

    You could use em for the font-size as well, but IE does weird things
    to the font-size on resizing if you do that. So, percentage is the way
    to go for text.

    --
    Els http://locusmeus.com/
    Sonhos vem. Sonhos vão. O resto é imperfeito.
    - Renato Russo -
     
    Els, May 14, 2005
    #2
    1. Advertising

  3. fritz wrote:
    > Whoa! There's a new idea in town. At least for me. The em, which I
    > see mentioned in a nearby post. The idea of using the em for text
    > needs a little explanation. But first, on my own I found out that
    > the em came from the idea of the size of a box that would enclose
    > the Roman letter "M". (it was all caps long ago).
    >
    > Cutting to the chase: Is this right? By setting the basic font size
    > to 1 em then you merely use the css properties of 'small',
    > 'x-large', etc to let the browser display it at it's best?


    To avoid a bug in Windows IE, use percentages instead of em.

    body, th, td ( font-size: 100%; }
    h1 { font-size: 150%; } /* season hx to taste */
    h2 { font-size: 135%; }
    ..legalese { font-size: 85%; }

    By using percentages, you won't need those "small" etc keywords that
    some browsers may have a problem with. Then, set sizes of divs with
    em, so when people change their font size, everything stays in order.

    --
    -bts
    -This space intentionally left blank.
     
    Beauregard T. Shagnasty, May 14, 2005
    #3
  4. fritz

    fritz Guest

    Thank you both very much for the comments and illumination! I'll try to
    put it into practice. Meanwhile it seems that more reading is always
    required.

    thanks.

    f.
     
    fritz, May 14, 2005
    #4
  5. fritz

    Andy Dingley Guest

    On Sat, 14 May 2005 10:10:25 -0700, fritz <> wrote:

    >Cutting to the chase: Is this right?


    Yes.

    >By setting the basic font size to 1 em


    Yes. body p { font-size: 1em; } is the only way to go. Anything that
    isn't this default size should be marked up as different from the
    default (in the HTML) Don;t mess with the user's own notions of a
    usable size to read the text - you don't know what their screen is
    about.

    Actually there's a glitch to the above. IE (of course) gets confused.
    Use this instead
    body p { font-size: 100%; }

    It means the same, but IE gets it right,


    If you have a stylesheet specifically for printing, it's often
    reasonable to use "physical" units in there, like points.


    >then you merely use the css properties of 'small', 'x-large', etc to
    >let the browser display it at it's best?


    Personally I find these less than obvious and would prefer to use
    font-size: 1.5; etc.


    --
    Cats have nine lives, which is why they rarely post to Usenet.
     
    Andy Dingley, May 14, 2005
    #5
  6. fritz

    Els Guest

    Andy Dingley wrote:

    > Personally I find these less than obvious and would prefer to use
    > font-size: 1.5; etc.


    1.5 what? Hobnobs? ;-)

    --
    Els http://locusmeus.com/
    Sonhos vem. Sonhos vão. O resto é imperfeito.
    - Renato Russo -
     
    Els, May 14, 2005
    #6
  7. Els wrote:
    > Andy Dingley wrote:
    >
    >> Personally I find these less than obvious and would prefer to use
    >> font-size: 1.5; etc.

    >
    > 1.5 what? Hobnobs? ;-)


    Cheeseburgers!

    --
    -bts
    -This space intentionally left blank.
     
    Beauregard T. Shagnasty, May 14, 2005
    #7
  8. fritz

    Els Guest

    Beauregard T. Shagnasty wrote:

    > Els wrote:
    >> Andy Dingley wrote:
    >>
    >>> Personally I find these less than obvious and would prefer to use
    >>> font-size: 1.5; etc.

    >>
    >> 1.5 what? Hobnobs? ;-)

    >
    > Cheeseburgers!


    Not! Andy is British (afaik), so it'll be Hobnobs! :)

    --
    Els http://locusmeus.com/
    Sonhos vem. Sonhos vão. O resto é imperfeito.
    - Renato Russo -
     
    Els, May 14, 2005
    #8
  9. Els wrote:

    > Beauregard T. Shagnasty wrote:
    >> Cheeseburgers!

    >
    > Not! Andy is British (afaik), so it'll be Hobnobs! :)


    Oh ok ... hobnobs this time then ...

    --
    -bts
    -This space intentionally left blank.
     
    Beauregard T. Shagnasty, May 14, 2005
    #9
  10. fritz

    fritz Guest

    Beauregard T. Shagnasty wrote:
    > Els wrote:
    >
    >> Beauregard T. Shagnasty wrote:
    >>
    >>> Cheeseburgers!

    >>
    >>
    >> Not! Andy is British (afaik), so it'll be Hobnobs! :)

    >
    >
    > Oh ok ... hobnobs this time then ...
    >

    I really wish I could agree with you but my dictionary defines "hobnob"
    as a verb, as in getting together to socialize with one of a *higher*
    class. But then also one "hobnobs" (intransitive) or perhaps in the past
    "hobnobbed". However, perhaps a new definition is now being cast for
    Dynamic HTML?

    1 em = 12 hobnobs? Or in the colonies:
    12 hobnobs = 1 cheesburger = 1 em = 12pt at 12ppem?

    f.
     
    fritz, May 14, 2005
    #10
  11. fritz

    Els Guest

    fritz wrote:

    > Beauregard T. Shagnasty wrote:
    >> Els wrote:
    >>
    >>> Beauregard T. Shagnasty wrote:
    >>>
    >>>> Cheeseburgers!
    >>>
    >>>
    >>> Not! Andy is British (afaik), so it'll be Hobnobs! :)

    >>
    >>
    >> Oh ok ... hobnobs this time then ...
    >>

    > I really wish I could agree with you but my dictionary defines "hobnob"
    > as a verb, as in getting together to socialize with one of a *higher*
    > class. But then also one "hobnobs" (intransitive) or perhaps in the past
    > "hobnobbed". However, perhaps a new definition is now being cast for
    > Dynamic HTML?
    >
    > 1 em = 12 hobnobs? Or in the colonies:
    > 12 hobnobs = 1 cheesburger = 1 em = 12pt at 12ppem?


    No! One Hobnob is worth much more than one cheeseburger!
    It's the Hobnob that's the higher class! Ever seen a cheeseburger
    wrapped in glossy paper with pictures of chocolate coated cookies on
    it? <g>

    --
    Els http://locusmeus.com/
    Sonhos vem. Sonhos vão. O resto é imperfeito.
    - Renato Russo -
    Now playing: Arcade Fire - Wake Up
     
    Els, May 14, 2005
    #11
  12. fritz

    fritz Guest

    Els wrote:
    > fritz wrote:
    >
    >
    >>Beauregard T. Shagnasty wrote:
    >>
    >>>Els wrote:
    >>>
    >>>
    >>>>Beauregard T. Shagnasty wrote:
    >>>>
    >>>>
    >>>>>Cheeseburgers!
    >>>>
    >>>>
    >>>>Not! Andy is British (afaik), so it'll be Hobnobs! :)
    >>>
    >>>
    >>>Oh ok ... hobnobs this time then ...
    >>>

    >>
    >>I really wish I could agree with you but my dictionary defines "hobnob"
    >>as a verb, as in getting together to socialize with one of a *higher*
    >>class. But then also one "hobnobs" (intransitive) or perhaps in the past
    >>"hobnobbed". However, perhaps a new definition is now being cast for
    >>Dynamic HTML?
    >>
    >>1 em = 12 hobnobs? Or in the colonies:
    >>12 hobnobs = 1 cheesburger = 1 em = 12pt at 12ppem?

    >
    >
    > No! One Hobnob is worth much more than one cheeseburger!
    > It's the Hobnob that's the higher class! Ever seen a cheeseburger
    > wrapped in glossy paper with pictures of chocolate coated cookies on
    > it? <g>
    >

    Did you really have to give me that image just as I go off for lunch?

    f.
     
    fritz, May 14, 2005
    #12
  13. fritz

    Els Guest

    fritz wrote:
    > Els wrote:
    >> fritz wrote:
    >>>Beauregard T. Shagnasty wrote:
    >>>>Els wrote:
    >>>>>Beauregard T. Shagnasty wrote:
    >>>>>>Cheeseburgers!
    >>>>>
    >>>>>Not! Andy is British (afaik), so it'll be Hobnobs! :)
    >>>>
    >>>>Oh ok ... hobnobs this time then ...
    >>>
    >>>I really wish I could agree with you but my dictionary defines "hobnob"
    >>>as a verb, as in getting together to socialize with one of a *higher*
    >>>class. But then also one "hobnobs" (intransitive) or perhaps in the past
    >>>"hobnobbed". However, perhaps a new definition is now being cast for
    >>>Dynamic HTML?
    >>>
    >>>1 em = 12 hobnobs? Or in the colonies:
    >>>12 hobnobs = 1 cheesburger = 1 em = 12pt at 12ppem?

    >>
    >> No! One Hobnob is worth much more than one cheeseburger!
    >> It's the Hobnob that's the higher class! Ever seen a cheeseburger
    >> wrapped in glossy paper with pictures of chocolate coated cookies on
    >> it? <g>
    >>

    > Did you really have to give me that image just as I go off for lunch?


    Lunch? Hobnobs are great for lunch! :)

    Well, I thought they were one summer in London... great for lunch and
    breakfast too.

    --
    Els http://locusmeus.com/
    Sonhos vem. Sonhos vão. O resto é imperfeito.
    - Renato Russo -
    Now playing: Arcade Fire - Wake Up
     
    Els, May 14, 2005
    #13
  14. fritz wrote:

    > Cutting to the chase: Is this right? By setting the basic font size to 1
    > em then you merely use the css properties of 'small', 'x-large', etc to
    > let the browser display it at it's best?


    No.

    Setting the font size with the em unit sets the font size as a proportion of
    the font size in the parent element. If the element is the <body>[1], then
    it is a proportion of the user's preference instead.

    The font size keywords are absolute sizes (although, IIRC, also based on the
    user's choice of font size). Setting the font size of an element with a
    keyword will be the same size no matter what font size you have specified
    for its ancestors.

    http://css-discuss.incutio.com/?page=FontSize might be useful.


    [1] or <html> depending on browser, content-type and possibly Doctype.
    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
     
    David Dorward, May 14, 2005
    #14
  15. fritz

    fritz Guest

    Els wrote:
    > fritz wrote:
    >
    >>Els wrote:
    >>
    >>>fritz wrote:
    >>>
    >>>>Beauregard T. Shagnasty wrote:
    >>>>
    >>>>>Els wrote:
    >>>>>
    >>>>>>Beauregard T. Shagnasty wrote:
    >>>>>>
    >>>>>>>Cheeseburgers!
    >>>>>>
    >>>>>>Not! Andy is British (afaik), so it'll be Hobnobs! :)
    >>>>>
    >>>>>Oh ok ... hobnobs this time then ...
    >>>>
    >>>>I really wish I could agree with you but my dictionary defines "hobnob"
    >>>>as a verb, as in getting together to socialize with one of a *higher*
    >>>>class. But then also one "hobnobs" (intransitive) or perhaps in the past
    >>>>"hobnobbed". However, perhaps a new definition is now being cast for
    >>>>Dynamic HTML?
    >>>>
    >>>>1 em = 12 hobnobs? Or in the colonies:
    >>>>12 hobnobs = 1 cheesburger = 1 em = 12pt at 12ppem?
    >>>
    >>>No! One Hobnob is worth much more than one cheeseburger!
    >>>It's the Hobnob that's the higher class! Ever seen a cheeseburger
    >>>wrapped in glossy paper with pictures of chocolate coated cookies on
    >>>it? <g>
    >>>

    >>Did you really have to give me that image just as I go off for lunch?

    >
    >
    > Lunch? Hobnobs are great for lunch! :)
    >
    > Well, I thought they were one summer in London... great for lunch and
    > breakfast too.
    >


    One summer in Scotland I tried "hagis" and thought it was great. But
    then I had it without a significant number of beers first and revised my
    opinion.

    Sort of like in the eastern part of the state of Pennsylvania in the US
    where they eat something called "Scrapple".

    However, I just got 12 squaks from my $8.00 gen-u-ine, alpine, made in
    SE asia, squaking bird clock which means it's time for lunch. Without
    hobnobs, hagis, or scrapple.

    TA

    f.
     
    fritz, May 14, 2005
    #15
  16. fritz wrote:
    > Sort of like in the eastern part of the state of Pennsylvania in
    > the US where they eat something called "Scrapple".


    I *love* scrapple!

    Put a bit of maple syrup on it...

    (I'm originally from Harrisburg. <g>)

    --
    -bts
    -This space intentionally left blank.
     
    Beauregard T. Shagnasty, May 14, 2005
    #16
  17. fritz

    fritz Guest

    David Dorward wrote:
    >
    > Setting the font size with the em unit sets the font size as a proportion of
    > the font size in the parent element. If the element is the <body>[1], then
    > it is a proportion of the user's preference instead.
    >
    > The font size keywords are absolute sizes (although, IIRC, also based on the
    > user's choice of font size). Setting the font size of an element with a
    > keyword will be the same size no matter what font size you have specified
    > for its ancestors.
    >
    > http://css-discuss.incutio.com/?page=FontSize might be useful.
    >
    >
    > [1] or <html> depending on browser, content-type and possibly Doctype.



    Thanks. In other words the default (medium) font is the reference.
    So - font-size: 1.5 em = font-size: 150%

    So in the very beginning at the body tag one could just set the fontsize
    to 100% and then use percentages to express your desired relational size
    of the text at any particular moment. Even setting the H1,H2, etc as a
    percentage of the norm and then using the H tags where appropriate and
    font-size: percentage for other than H sizes. Is this getting to what
    you mean?

    f.
     
    fritz, May 14, 2005
    #17
  18. fritz wrote:

    > Thanks. In other words the default (medium) font is the reference.


    Only Internet Explorer, AFAIK, uses keywords to reference font sizes in its
    UI - and in Quirks mode, I seem to recall that its "medium" is CSSs
    "smaller".

    The reference is the font size of the parent element though - so you get a
    multiplication effect with relative font sizes.

    > So - font-size: 1.5 em = font-size: 150%


    "1.5em", not "1.5 em"

    > So in the very beginning at the body tag one could just set the fontsize
    > to 100%


    Which is the default

    > and then use percentages to express your desired relational size
    > of the text at any particular moment. Even setting the H1,H2, etc as a
    > percentage of the norm and then using the H tags where appropriate and
    > font-size: percentage for other than H sizes. Is this getting to what
    > you mean?


    Yes.

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
     
    David Dorward, May 14, 2005
    #18
  19. fritz

    kchayka Guest

    fritz wrote:
    >
    > 12 hobnobs = 1 cheesburger


    Hmmm... is that based on total weight or some nutritional value? :)

    --
    Reply email address is a bottomless spam bucket.
    Please reply to the group so everyone can share.
     
    kchayka, May 14, 2005
    #19
  20. fritz wrote:
    > So in the very beginning at the body tag one could just set the
    > fontsize to 100% and then use percentages to express your desired
    > relational size of the text at any particular moment.


    No, not in the body tag (element).

    You set those in your style sheet. CSS.
    http://htmldog.com/guides/cssbeginner/

    --
    -bts
    -This space intentionally left blank.
     
    Beauregard T. Shagnasty, May 14, 2005
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page