HighDots Forums  

Re: Table cell font size not influenced by body style????

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Re: Table cell font size not influenced by body style???? in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ben C
 
Posts: n/a

Default Re: Table cell font size not influenced by body style???? - 10-12-2006 , 09:41 AM






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".


Reply With Quote
  #2  
Old   
xformer
 
Posts: n/a

Default Re: Table cell font size not influenced by body style???? - 10-12-2006 , 09:50 AM






Hi, Ben
Hi, Andy,

thanks for your answers.

Unfortunately, the "table { font-size: inherit; }" thing does not
work here. I have to add the "loose" definition to the transitional DTD
or switch to the strict DTD.


Regards,

Frank


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.