On 2006-10-12, xformer <gemenge (AT) hotmail (DOT) com> wrote:
Quote:
Hello everybody,
today I was working on a web site when I found a strange effect.
Take the following html document:
[snip]
It looks like the table text gets it's colour from the body
definition but not the font size. I don't get this? Why is this so? Has
anybody an idea? IE6 and FF1.5 show the same behaviour. |
If you add a style rule
table
{
font-size: inherit;
}
to your example
you get the font-size: 75% passed through to the tds, and the behaviour
you expect.
So it looks like the defaults for p are color: inherit and font-size:
inherit, but that the defaults for table are color: inherit but not
font-size: inherit.
For a td to inherit the font-size specified in the body, there needs to
be a complete inheritance chain all the way to body. Otherwise the td
(whose default font-size is I think inherit) stops at inheriting the
table's font-size, which is probably defaulting to "medium".