font size in tables

Discussion in 'HTML' started by chlori, Jul 2, 2003.

  1. chlori

    chlori Guest

    Hi Newsgroup

    If I use...

    body, td
    {
    font-size : 95%;
    }

    ....then in Mozilla 1.3 the font size in tables is smaller than the rest.
    ....in IE6 the fontsize in tables is like the rest.


    If I use...

    body (without td)
    {
    font-size : 95%;
    }

    ....in Mozilla 1.3 the fontsize in tables is like the rest.
    ....then in IE6 the font size in tables is 100% and the rest is 95%.

    How can I make the font size for both Browsers 95% (tables and rest)?

    Thanks for your help.
    chlori
    chlori, Jul 2, 2003
    #1
    1. Advertising

  2. chlori

    Steve Pugh Guest

    "chlori" <> wrote:

    >body, td
    >{
    > font-size : 95%;
    >}
    >
    >...then in Mozilla 1.3 the font size in tables is smaller than the rest.
    >...in IE6 the fontsize in tables is like the rest.


    Font size is supposed to be inherited. So you're setting it to 95% on
    the body and then 95% * 95% in the td, or 90%. Mozila is correct, IE
    is wrong.

    >body (without td)
    >{
    > font-size : 95%;
    >}
    >
    >...in Mozilla 1.3 the fontsize in tables is like the rest.
    >...then in IE6 the font size in tables is 100% and the rest is 95%.


    Again, IE is failing to inherit the font size. IE is wrong.

    >How can I make the font size for both Browsers 95% (tables and rest)?


    Why do you want to make all the text 5% smaller than the size that the
    user has chosen as the most comfortable to read?

    If you use a doctype that triggers standards mode (see
    http://www.hut.fi/~hsivonen/doctype.html) then IE6 Win and IE5 Mac
    will behave like Mozilla and inherit the font sizing correctly. If you
    prepared to let users of older IEs "suffer" with the slightly larger
    font sizes then this is the easiest course of action.

    The next level of complexity is to use a hack like this (with a
    doctype that triggers standards mode):
    body, td { font-size : 95%; }
    td {
    voice-family:"\"}\"";
    voice-family:inherit;
    font-size : 100%
    }

    The second style isn't recognised by IE5.5 and lower and so doesn't
    set the font-size back to 100% (that's 100% * 95% when inheritance is
    taken into account).

    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, Jul 2, 2003
    #2
    1. Advertising

  3. chlori

    Arto Steiner Guest

    "Steve Pugh" <> schrieb im Newsbeitrag
    news:...

    > Why do you want to make all the text 5% smaller than the size that the
    > user has chosen as the most comfortable to read?


    I think it's difficult and dangerous to try to answer this one ;-) ...
    I'll set my font size to 100% later. I've been reading here for
    some time and now I'm changing my site step by step:
    tables to CSS, validate HTML and CSS, hide CSS
    from NN4x, Naviation without Javascript, change font size
    to 100%, ...
    ....
    but I want to change my design a bit before I do that.

    > If you use a doctype that triggers standards mode (see
    > http://www.hut.fi/~hsivonen/doctype.html) then IE6 Win and IE5 Mac
    > will behave like Mozilla and inherit the font sizing correctly. If you
    > prepared to let users of older IEs "suffer" with the slightly larger
    > font sizes then this is the easiest course of action.


    It works! ...but you're probably not surprised ;-)
    I never heard anything before about standards mode and all that...

    > The next level of complexity is to use a hack like this (with a
    > doctype that triggers standards mode):
    > body, td { font-size : 95%; }
    > td {
    > voice-family:"\"}\"";
    > voice-family:inherit;
    > font-size : 100%
    > }


    I still have to try this one.

    (I don't know why you do it, but...)
    Thanks for your help, Steve!

    chlori
    Arto Steiner, Jul 4, 2003
    #3
    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,060
    Peter Theill
    Nov 28, 2004
  2. dave richards
    Replies:
    2
    Views:
    609
    Paul Furman
    Feb 19, 2004
  3. Helmut Blass

    font size in tables

    Helmut Blass, Feb 24, 2004, in forum: HTML
    Replies:
    7
    Views:
    609
    Sid Ismail
    Feb 25, 2004
  4. wial
    Replies:
    2
    Views:
    818
  5. mttc
    Replies:
    2
    Views:
    2,386
    Roedy Green
    Jul 3, 2009
Loading...

Share This Page