font size in tables

C

chlori

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
 
S

Steve Pugh

chlori said:
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
 
A

Arto Steiner

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,754
Messages
2,569,525
Members
44,997
Latest member
mileyka

Latest Threads

Top