font size %

Discussion in 'HTML' started by chlori, Feb 10, 2005.

  1. chlori

    chlori Guest

    I've read that some people use a font size 100.01% to
    prevent a bug from making fonts tiny.

    For example here:
    http://archivist.incutio.com/viewlist/css-discuss/39971

    But I don't see many sites using 100.01%.

    I read other people writing: "use % and use 100 of
    them" while others say "use % but not exactly 100".

    - What's really true?
    - Why/when use 100% (or 100.01%) for <body> instead of
    'no specified font size' at all?
    - Can I use 100.01% for <body> and then em for the rest
    (hx, p etc.) without any bug problems (like IE)?

    --
    chlori
     
    chlori, Feb 10, 2005
    #1
    1. Advertising

  2. chlori

    Steve Pugh Guest

    chlori <chlori@.invalid> wrote:

    >I've read that some people use a font size 100.01% to
    >prevent a bug from making fonts tiny.


    There was a bug in some older versions of Opera. But that's not
    relevant now so this hack is no longer needed.

    >For example here:
    >http://archivist.incutio.com/viewlist/css-discuss/39971


    The author of that post states that he doesn't know why 100.1% is
    needed.

    >But I don't see many sites using 100.01%.


    I don't see many using 100% either. :-(

    >I read other people writing: "use % and use 100 of
    >them" while others say "use % but not exactly 100".
    >
    >- What's really true?


    Well that very much depends on which school of philosophy you belong
    to. (He says giving an answer straight out of the sceptic school).

    >- Why/when use 100% (or 100.01%) for <body> instead of
    >'no specified font size' at all?


    Good question. Some people prefer to use em for font sizes but thanks
    to a bug in IE need to set 100% initially. Why they don't just use %
    throughout is a mystery to me.

    >- Can I use 100.01% for <body> and then em for the rest
    >(hx, p etc.) without any bug problems (like IE)?


    Yes. Or you can use % throughout.

    Steve

    --
    "My theories appal you, my heresies outrage you,
    I never answer letters and you don't like my tie." - The Doctor

    Steve Pugh <> <http://steve.pugh.net/>
     
    Steve Pugh, Feb 10, 2005
    #2
    1. Advertising

  3. chlori

    Dylan Parry Guest

    Steve Pugh wrote:

    > Good question. Some people prefer to use em for font sizes but thanks
    > to a bug in IE need to set 100% initially. Why they don't just use %
    > throughout is a mystery to me.


    It's not just for setting font sizes that em can be useful. It can also
    be used for setting padding, width, height, margins etc. Using em, the
    paddings et al. are set in relation to the size of text that they
    contain, whereas if you were to use % then it would be in relation to
    the canvas size.

    --
    Dylan Parry
    http://webpageworkshop.co.uk -- FREE Web tutorials and references
     
    Dylan Parry, Feb 10, 2005
    #3
  4. chlori

    Spartanicus Guest

    Dylan Parry <> wrote:

    >whereas if you were to use % then it would be in relation to
    >the canvas size.


    Viewport width.

    --
    Spartanicus
     
    Spartanicus, Feb 10, 2005
    #4
  5. chlori

    Steve Pugh Guest

    Dylan Parry <> wrote:
    >Steve Pugh wrote:
    >
    >> Good question. Some people prefer to use em for font sizes but thanks
    >> to a bug in IE need to set 100% initially. Why they don't just use %
    >> throughout is a mystery to me.

    >
    >It's not just for setting font sizes that em can be useful.


    I know. I was talking solely about the usage for font-size.

    Steve

    --
    "My theories appal you, my heresies outrage you,
    I never answer letters and you don't like my tie." - The Doctor

    Steve Pugh <> <http://steve.pugh.net/>
     
    Steve Pugh, Feb 10, 2005
    #5
  6. chlori

    chlori Guest

    Steve Pugh schrieb am 10.02.2005 13:11:
    >>I've read that some people use a font size 100.01% to
    >>prevent a bug from making fonts tiny.

    >
    > There was a bug in some older versions of Opera. But that's not
    > relevant now so this hack is no longer needed.


    Why isn't it relevant now? Why not use that simple and
    easy hack just in case 1 visitor comes with an old
    opera version. Are there any disadvantages?

    >>But I don't see many sites using 100.01%.

    >
    > I don't see many using 100% either. :-(


    Well that's true... :)

    >>- Why/when use 100% (or 100.01%) for <body> instead of
    >>'no specified font size' at all?

    >
    > Good question. Some people prefer to use em for font sizes but thanks
    > to a bug in IE need to set 100% initially. Why they don't just use %
    > throughout is a mystery to me.


    Why they don't just use *nothing* throughout is a
    mystery to me...

    --
    chlori
     
    chlori, Feb 10, 2005
    #6
  7. chlori

    Steve Pugh Guest

    chlori <chlori@.invalid> wrote:
    >Steve Pugh schrieb am 10.02.2005 13:11:
    >>>I've read that some people use a font size 100.01% to
    >>>prevent a bug from making fonts tiny.

    >>
    >> There was a bug in some older versions of Opera. But that's not
    >> relevant now so this hack is no longer needed.

    >
    >Why isn't it relevant now?


    Opera users tend to upgrade fairly quickly. This bug was in v5 and v6
    of Opera and was fixed in the 7.0 betas IIRC.

    OTOH there are some Opera users who think that v5 was the best ever
    and that everything since is a huge mistake.

    >Why not use that simple and
    >easy hack just in case 1 visitor comes with an old
    >opera version. Are there any disadvantages?


    It looks messy?
    It requires adding to documentation so future editors know why you've
    done such a strange thing?

    I don't think there's any technical disadvantage to this method so use
    it you like, but please remember why you're using it - don't let it
    become another piece of cargo cult nonsense that get's shoved into
    every CSS file just because it has been shoved into every CSS file.

    Steve

    --
    "My theories appal you, my heresies outrage you,
    I never answer letters and you don't like my tie." - The Doctor

    Steve Pugh <> <http://steve.pugh.net/>
     
    Steve Pugh, Feb 10, 2005
    #7
  8. chlori

    Dylan Parry Guest

    Spartanicus wrote:

    >>whereas if you were to use % then it would be in relation to
    >>the canvas size.

    >
    > Viewport width.


    Erm, yeah that's what I meant :)

    --
    Dylan Parry
    http://webpageworkshop.co.uk -- FREE Web tutorials and references
     
    Dylan Parry, Feb 10, 2005
    #8
  9. chlori

    Dylan Parry Guest

    Dylan Parry wrote:
    > Spartanicus wrote:
    >>> whereas if you were to use % then it would be in relation to the
    >>> canvas size.

    >>
    >> Viewport width.

    >
    > Erm, yeah that's what I meant :)


    Actually, no, that's not what I meant. What I should have said was "if
    you were to use % then it would be in relation to the parent element's
    dimensions."


    --
    Dylan Parry
    http://webpageworkshop.co.uk -- FREE Web tutorials and references
     
    Dylan Parry, Feb 10, 2005
    #9
  10. chlori

    Toby Inkster Guest

    Steve Pugh wrote:

    > OTOH there are some Opera users who think that v5 was the best ever
    > and that everything since is a huge mistake.


    O5 was great. After O5, the UI started to get slower. It's still faster
    than most other browsers, but not as fast as O5.

    OTOH, the rendering engine in O7.x, and particularly in O7.5 is state of
    the art. O5's rendering engine was good -- and people seem to forget how
    good it was -- but lacked one or two major features -- in particular
    reflowing, so some hover effects and dynamic pages could look awful and
    overlap.

    Would be nice to have an Opera that combined the UI of O5 with the
    rendering engine, and customisable toolbars and menus of O7.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
     
    Toby Inkster, Feb 10, 2005
    #10
  11. chlori

    Richard Guest

    On Thu, 10 Feb 2005 12:46:53 +0100 chlori wrote:

    > I've read that some people use a font size 100.01% to
    > prevent a bug from making fonts tiny.


    > For example here:
    > http://archivist.incutio.com/viewlist/css-discuss/39971


    > But I don't see many sites using 100.01%.


    > I read other people writing: "use % and use 100 of
    > them" while others say "use % but not exactly 100".


    > - What's really true?
    > - Why/when use 100% (or 100.01%) for <body> instead of
    > 'no specified font size' at all?
    > - Can I use 100.01% for <body> and then em for the rest
    > (hx, p etc.) without any bug problems (like IE)?


    IMNSHO, if you're going to use font-size, then use it properly.
    A font size is given in "points".
    If you want to increase or decrease the font size, then change the points.
    Forget using %. It's totally meaningless in fonts.
    So what's 100% of 10px?
    Duhhhhhhhh. 10px.

    font-family: arial; font-size:12pt.
    The machine does not have to do any extra work in conversion.
     
    Richard, Feb 10, 2005
    #11
  12. chlori

    Oli Filth Guest

    Richard wrote:
    > IMNSHO, if you're going to use font-size, then use it properly.
    > A font size is given in "points".
    > If you want to increase or decrease the font size, then change the points.
    > Forget using %. It's totally meaningless in fonts.
    > So what's 100% of 10px?
    > Duhhhhhhhh. 10px.
    >


    **** off!

    To the OP, please don't listen to *anything* Richard says, 99.9% of it
    is shit, including this.

    To clarify, specifying HTML font-sizes in pt is close to meaningless.
    Specifying in pixel-size is kind-of ok, but doesn't allow the user's own
    settings to take precedence, i.e. it's bad for accessibility issues.

    Percentage *is* the most correct way to specify fonts (if you wish to
    adhere to accessibility guidelines, good practices, etc.), as it means
    that the text users see will be normalised to their browser settings.


    --
    Oli
     
    Oli Filth, Feb 10, 2005
    #12
  13. chlori

    Duende Guest

    While sitting in a puddle Richard scribbled in the mud:

    >> - What's really true?
    >> - Why/when use 100% (or 100.01%) for <body> instead of
    >> 'no specified font size' at all?
    >> - Can I use 100.01% for <body> and then em for the rest
    >> (hx, p etc.) without any bug problems (like IE)?

    >
    > IMNSHO, if you're going to use font-size, then use it properly.
    > A font size is given in "points".
    > If you want to increase or decrease the font size, then change the points.
    > Forget using %. It's totally meaningless in fonts.
    > So what's 100% of 10px?
    > Duhhhhhhhh. 10px.
    >
    > font-family: arial; font-size:12pt.
    > The machine does not have to do any extra work in conversion.


    For some reason I'm getting so I kinda like you. Just takes a while to see
    where you're comming from.

    --
     
    Duende, Feb 10, 2005
    #13
  14. chlori

    JDS Guest

    On Thu, 10 Feb 2005 13:26:09 -0600, Richard wrote:

    > IMNSHO, if you're going to use font-size, then use it properly. A font
    > size is given in "points".
    > If you want to increase or decrease the font size, then change the points.
    > Forget using %. It's totally meaningless in fonts. So what's 100% of 10px?
    > Duhhhhhhhh. 10px.


    A reasonably god example of why Richard's advice is best not heeded.

    --
    JDS |
    | http://www.newtnotes.com
    DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/
     
    JDS, Feb 10, 2005
    #14
  15. chlori

    Oli Filth Guest

    JDS wrote:
    > A reasonably god example of why Richard's advice is best not heeded.

    ^
    Freudian slip?!?

    --
    Oli
     
    Oli Filth, Feb 10, 2005
    #15
  16. chlori

    JDS Guest

    JDS, Feb 10, 2005
    #16
  17. Richard wrote:

    > On Thu, 10 Feb 2005 12:46:53 +0100 chlori wrote:


    Chlori, please disregard any advice by Richard. It is always wrong.

    > IMNSHO,


    IYNSHWO. (In your not so humble wrong opinion)

    > if you're going to use font-size, then use it properly.
    > A font size is given in "points".


    ...on paper. Print media.

    > If you want to increase or decrease the font size, then change the points.
    > Forget using %. It's totally meaningless in fonts.


    Wrong again, Robin. You have forgotten about all those IE users who
    will not be able to resize your minuscule choice to something they can
    read.

    > So what's 100% of 10px?
    > Duhhhhhhhh. 10px.


    Your 10px is not the same as my 10px.

    > font-family: arial; font-size:12pt.


    font-family: arial, sans-serif; font-size: 100%;

    > The machine does not have to do any extra work in conversion.


    Less work? Worse for the visitor.

    --
    -bts
    -This space intentionally left blank.
     
    Beauregard T. Shagnasty, Feb 10, 2005
    #17
  18. chlori

    JDS Guest

    On Thu, 10 Feb 2005 19:52:38 +0000, Oli Filth wrote:

    > To the OP, please don't listen to *anything* Richard says, 99.9% of it is
    > shit, including this.


    Frankly, I can't figure the guy (or girl?) out! So, really, who is he?
    Why is he a kook? How old is he? Where is he? etc. I just gotta know.

    Does he *really* have no capacity for learning? Or is it an act?

    I'm talking about Richard, BTW.

    --
    JDS |
    | http://www.newtnotes.com
    DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/
     
    JDS, Feb 10, 2005
    #18
  19. chlori

    Toby Inkster Guest

    JDS wrote:

    > Yeah, I noticed that peripherally *just* as I was clicking "Send"...


    Always teh way.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
     
    Toby Inkster, Feb 10, 2005
    #19
  20. chlori

    rf Guest

    "Richard" <Anonymous@127.001> wrote

    > IMNSHO, if you're going to use font-size, then use it properly.
    > A font size is given in "points".


    Wrong.

    > If you want to increase or decrease the font size, then change the points.


    Wrong.

    > Forget using %. It's totally meaningless in fonts.


    Wrong.

    > So what's 100% of 10px?
    > Duhhhhhhhh. 10px.


    Finally a correct answer. however it is to the wrong question.

    100% is used to stop a bug in IE where font size specified in ems causes the
    font size to *dramatically* increase or decrease when the user changes font
    size to smaller or larger.

    the .1 in 100.1% is cargo cult.

    > font-family: arial; font-size:12pt.


    Wrong.

    > The machine does not have to do any extra work in conversion.


    Wrong. It has to convert from points to pixels.

    In any case this is one multiplication and one division. Totally trivial
    compared to the time spent rasterising the font.
     
    rf, Feb 10, 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.
Similar Threads
  1. Andreas Klemt
    Replies:
    6
    Views:
    11,095
    Peter Theill
    Nov 28, 2004
  2. dave richards
    Replies:
    2
    Views:
    616
    Paul Furman
    Feb 19, 2004
  3. Wongod
    Replies:
    2
    Views:
    715
  4. wial
    Replies:
    2
    Views:
    824
  5. mttc
    Replies:
    2
    Views:
    2,408
    Roedy Green
    Jul 3, 2009
Loading...

Share This Page