HighDots Forums  

Why does TD not inherit from BODY?

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


Discuss Why does TD not inherit from BODY? in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Axel Dahmen
 
Posts: n/a

Default Why does TD not inherit from BODY? - 07-06-2003 , 09:36 AM






Hi,

there's one question that's been bothering me for a long time: Why does the TD element not inherit from the BODY element? Is there any reason why properties like "font-family" or "font-size" are not applied to content of TD if I assign them to the BODY element?

Thanks a lot for enlightening me!

Axel Dahmen


Reply With Quote
  #2  
Old   
Steve Pugh
 
Posts: n/a

Default Re: Why does TD not inherit from BODY? - 07-06-2003 , 10:33 AM






"Axel Dahmen" <NoSpam (AT) NoOneKnows (DOT) de> wrote:

Quote:
there's one question that's been bothering me for a long time:
Why does the TD element not inherit from the BODY element?
It does.

Quote:
Is there any reason why properties like "font-family" or "font-size"
are not applied to content of TD if I assign them to the BODY element?
The problem is with crap browsers. Modern browsers handle inheritence
correctly, but in many cases you need to specify a doctype that will
trigger standards mode rather than quirks mode.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <steve (AT) pugh (DOT) net> <http://steve.pugh.net/>


Reply With Quote
  #3  
Old   
Lauri Raittila
 
Posts: n/a

Default Re: Why does TD not inherit from BODY? - 07-06-2003 , 06:24 PM



In article <bea01q$ac9$1 (AT) sunce (DOT) iskon.hr>, Berislav Lopac wrote:

Quote:
Lasse and Steve explained it excellently, and I just want to let you know
that you can work around such bugs using the body * selector, which sets the
style for all elements which are descendents of body.
And you might end up with having all headers same size, unless you
explicitly set them.

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Saapi lähettää meiliä, jos aihe ei liity ryhmään, tai on yksityinen
tjsp., mutta älä lähetä samaa viestiä meilitse ja ryhmään.



Reply With Quote
  #4  
Old   
David Dorward
 
Posts: n/a

Default Re: Why does TD not inherit from BODY? - 07-08-2003 , 05:23 PM



Axel Dahmen wrote:

Quote:
Why does the TD element not inherit from the BODY element? Is there any
reason why properties like "font-family" or "font-size" are not applied to
content of TD if I assign them to the BODY element?
Other people have explained the why, this is the how:

table, thead, tbody, tr, td, th {
font-size: inherit;
font-family: inherit;
}

--
David Dorward http://david.us-lot.org/
Redesign in progress: http://stone.thecoreworlds.net/
Microsoft announces IE is dead (so upgrade):
http://minutillo.com/steve/weblog/20...ces-ie-is-dead


Reply With Quote
  #5  
Old   
Axel Dahmen
 
Posts: n/a

Default Re: Why does TD not inherit from BODY? - 07-16-2003 , 07:32 PM



Thanks a lot to all of you for your valuable and versatile answers. You've been a great help to me.

Now there's one thing I don't understand: "quirks mode" and "standard mode" seem to have become a technical term. I don't understand their meaning in terms of a browser's mode. How do I set a browser to one or the other? Or is it just a label for a style definition like the one David Dorward posted:

Quote:
Other people have explained the why, this is the how:

table, thead, tbody, tr, td, th {
font-size: inherit;
font-family: inherit;
}
TIA,
Axel Dahmen



Reply With Quote
  #7  
Old   
Jacqui or (maybe) Pete
 
Posts: n/a

Default Re: Quirks mode vs. Standards mode - 07-17-2003 , 02:31 AM



In article <bf4rrj$2h8$1 (AT) nnrp (DOT) atgi.net>, rbarnet (AT) csaNOSPAMreno (DOT) org
says...
Quote:
"Geoff Ball" <usenet (AT) doctype (DOT) ca> wrote in message
news:3160181.TuWkE2YOz3 (AT) doctype (DOT) ca...

....
http://nontroppo.org/wiki/OperaQuirksMode
....
The trick of typing
javascript:alert(document.compatMode);
into the address bar mentioned in the document above also works in
Mozilla & IE6.

It's easy to create a bookmarklet for it (at least in Mozilla) by
setting the url of any existing bookmark (make one for the purpose) to
the value above.


Reply With Quote
  #8  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: Why does TD not inherit from BODY? - 07-17-2003 , 05:19 AM



David Dorward <dorward (AT) yahoo (DOT) com> wrote:

Quote:
Other people have explained the why, this is the how:

table, thead, tbody, tr, td, th {
font-size: inherit;
font-family: inherit;
}
I'm sorry to comment on this so late (but summer time is an excuse for
everything, isn't it?), but that doesn't really help anything, as far
as I can see. Browsers that fail to obey inheritance rules generally
don't recognize the inherit keyword either; it's an CSS 2 "novelty".

What you _can_ do to make old browsers behave in this issue is to use

body, caption, th, td {
font-size: ...;
font-family: ...; }

where ... stands for whatever global settings you wish to make. (Adding
table, thead, tbody, tr is superfluous, since caption, th, td directly
captures any content in a table).

--
Yucca, http://www.cs.tut.fi/~jkorpela/


Reply With Quote
  #9  
Old   
Richard Barnet
 
Posts: n/a

Default Re: Quirks mode vs. Standards mode - 07-17-2003 , 01:04 PM



"Jacqui or (maybe) Pete" <porjes (AT) spamcop (DOT) net> wrote

Quote:
It's easy to create a bookmarklet for it (at least in Mozilla) by
setting the url of any existing bookmark (make one for the purpose) to
the value above.
This also is the same in Windows/MSIE. Works great! Excellent suggestion
and tip.

=)

-- Richard




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.