[thelist] CSS Question - Table Inheritance

pandy pandion at gmx.net
Thu Sep 22 10:43:05 CDT 2005


Jay Blanchard wrote:
>Gawd, I'm going to sound like a newbie....but I cannot remember. If I have
>this....
>
>#content {
>         background: #FFFFFF;
>         font: 0.8em arial, sans-serif, "Trebuchet MS";
>         height: auto;
>         text-align: justify;
>         padding: 160px 70px 0px 70px;
>}
>
>and do this....
>
><div id="content">
><table ....
>
>everything here is normal table stuff, no classes or id's, etc
>
>...table>
></div>
>
>Shouldn't the table use the font declared in 'content', including the size?

Should, yes. I *think* all newer browsers do it right if in Standards Mode. 
But when in Quirks Mode they keep the good old tradition alive and don't 
let tables inherit some font properties. So either use Standards Mode or 
safe proof the selector. '#content, #content td, #content th'. I think 
maybe '#content, #content table' is enough, but too lazy to check.

pandy




More information about the thelist mailing list