Why does TD not inherit from BODY?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Axel Dahmen

    Why does TD not inherit from BODY?

    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

  • Steve Pugh

    #2
    Re: Why does TD not inherit from BODY?

    "Axel Dahmen" <NoSpam@NoOneKn ows.de> wrote:
    [color=blue]
    >there's one question that's been bothering me for a long time:
    >Why does the TD element not inherit from the BODY element?[/color]

    It does.
    [color=blue]
    >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?[/color]

    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@pugh.net > <http://steve.pugh.net/>

    Comment

    • Lauri Raittila

      #3
      Re: Why does TD not inherit from BODY?

      In article <bea01q$ac9$1@s unce.iskon.hr>, Berislav Lopac wrote:
      [color=blue]
      > 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.[/color]

      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.

      Comment

      • David Dorward

        #4
        Re: Why does TD not inherit from BODY?

        Axel Dahmen wrote:
        [color=blue]
        > 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?[/color]

        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):

        Comment

        • Axel Dahmen

          #5
          Re: Why does TD not inherit from BODY?

          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:
          [color=blue]
          > Other people have explained the why, this is the how:
          >
          > table, thead, tbody, tr, td, th {
          > font-size: inherit;
          > font-family: inherit;
          > }[/color]

          TIA,
          Axel Dahmen

          Comment

          • Geoff Ball

            #6
            Re: Quirks mode vs. Standards mode

            Axel Dahmen <bf4qsu$873$1@o nline.de> wrote in
            comp.infosystem s.www.authoring.stylesheets:
            [color=blue]
            > 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?[/color]

            The MDN Web Docs site provides information about Open Web technologies including HTML, CSS, and APIs for both Web sites and progressive web apps.


            Aalto University, Finland is a new multidisciplinary science and art community in the fields of science, business, and art and design.


            ✔️ 1win bookmaker, vous permet de parier sur le site officiel ⚡ Les meilleures cotes et des bonus généreux. Utilisez les miroirs.




            Regards,
            Geoff

            --


            Comment

            • Richard Barnet

              #7
              Re: Quirks mode vs. Standards mode

              "Geoff Ball" <usenet@doctype .ca> wrote in message
              news:3160181.Tu WkE2YOz3@doctyp e.ca...[color=blue]
              >
              > http://www.mozilla.org/docs/web-developer/quirks/
              > http://dbaron.org/mozilla/quirklist
              > http://www.hut.fi/u/hsivonen/doctype.html
              > http://developer.apple.com/internet/html/doctype.html
              > http://nontroppo.org/wiki/OperaQuirksMode
              > http://diveintomark.org/archives/200...irks_mode.html
              > http://www.htmlhelp.com/tools/validator/doctype.html
              >[/color]

              Much better. =)

              -- Richard


              Comment

              • Geoff Ball

                #8
                Re: Why does TD not inherit from BODY?

                Richard Barnet <bf4rcr$2g0$1@n nrp.atgi.net> wrote in
                comp.infosystem s.www.authoring.stylesheets:
                [color=blue]
                > "Axel Dahmen" <NoSpam@NoOneKn ows.de> wrote in message
                > news:bf4qsu$873 $1@online.de...
                >[color=green]
                >> Now there's one thing I don't understand: "quirks mode" and "standard[/color]
                > mode" seem to[color=green]
                >> have become a technical term. I don't understand their meaning in terms
                >> of[/color]
                > a browser's[color=green]
                >> mode. How do I set a browser to one or the other?[/color]
                >
                > As far as I understand it, it's an MSIE thing.[/color]

                Mozilla and Opera, among others, have both modes as well.
                [color=blue]
                > IE6 (at least) 'switches' modes according to the DOCTYPE you use on the
                > first line of your page(s).[/color]

                It's rather weird in how it determines which mode to go into. If you put
                anything before the doctype, it goes into Quirks mode, regardless of if
                your doctype was proper or not. See
                <URL:http://www.hut.fi/u/hsivonen/doctype.html> for more info.
                [color=blue]
                > If you don't have a DOCTYPE at all, IE goes into "quirks" mode and thus
                > supports older (non-strict) HTML and buggy code. If you have a valid
                > DOCTYPE (i.e., <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
                > Transitional//EN"
                > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">), then it goes
                > into 'standards' mode, which requires compliant coding, etc.[/color]

                You can have a perfectly valid doctype, even with a URL, and still have a
                browser go into Quirks mode.

                The biggest issue between standards and quirks mode is how IE interprets the
                box model.

                Regards,
                Geoff

                --


                Comment

                • Jacqui or (maybe) Pete

                  #9
                  Re: Quirks mode vs. Standards mode

                  In article <bf4rrj$2h8$1@n nrp.atgi.net>, rbarnet@csaNOSP AMreno.org
                  says...[color=blue]
                  > "Geoff Ball" <usenet@doctype .ca> wrote in message
                  > news:3160181.Tu WkE2YOz3@doctyp e.ca...[color=green]
                  > >[/color][/color]
                  ....[color=blue][color=green]
                  > > http://nontroppo.org/wiki/OperaQuirksMode[/color][/color]
                  ....
                  The trick of typing
                  javascript:aler t(document.comp atMode);
                  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.

                  Comment

                  • Jukka K. Korpela

                    #10
                    Re: Why does TD not inherit from BODY?

                    David Dorward <dorward@yahoo. com> wrote:
                    [color=blue]
                    > Other people have explained the why, this is the how:
                    >
                    > table, thead, tbody, tr, td, th {
                    > font-size: inherit;
                    > font-family: inherit;
                    > }[/color]

                    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/

                    Comment

                    • Richard Barnet

                      #11
                      Re: Quirks mode vs. Standards mode

                      "Jacqui or (maybe) Pete" <porjes@spamcop .net> wrote in message
                      news:MPG.198059 aed1f6b86e989c4 d@news.CIS.DFN. DE...[color=blue]
                      >
                      > 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.[/color]

                      This also is the same in Windows/MSIE. Works great! Excellent suggestion
                      and tip.

                      =)

                      -- Richard


                      Comment

                      Working...