odd/even table rows

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • bill drescher

    odd/even table rows

    I have a long table and I want to have the alternating rows slightly
    different colors for clarity.

    Is there any way to avoid using a class designation in each tr ?

    (yes, it is for tabular data !)
    --
    Bill Drescher
    william {at} TechServSys {dot} com
  • Ben Shimmin

    #2
    Re: odd/even table rows

    bill drescher <nobody@Spamcop .net>:[color=blue]
    > I have a long table and I want to have the alternating rows slightly
    > different colors for clarity.
    >
    > Is there any way to avoid using a class designation in each tr ?
    >
    > (yes, it is for tabular data !)[/color]

    <URL:http://www.alistapart. com/articles/zebratables/>

    In short, no.

    b.

    --
    Ben Shimmin (bas@bas.me.uk) <URL:http://bas.me.uk/>
    <URL:http://gpg.bas.me.uk/>

    Comment

    • brucie

      #3
      Re: odd/even table rows

      in post: <news:10flrhtsi hsnifb@corp.sup ernews.com>
      bill drescher <nobody@Spamcop .net> said:
      [color=blue]
      > I have a long table and I want to have the alternating rows slightly
      > different colors for clarity. Is there any way to avoid using a
      > class designation in each tr ?[/color]


      [color=blue]
      > (yes, it is for tabular data !)[/color]

      thats what they all say

      --
      b r u c i e


      Comment

      • bill drescher

        #4
        Re: odd/even table rows

        brucie wrote:
        [color=blue]
        > in post: <news:10flrhtsi hsnifb@corp.sup ernews.com>
        > bill drescher <nobody@Spamcop .net> said:
        >
        >[color=green]
        >>I have a long table and I want to have the alternating rows slightly
        >>different colors for clarity. Is there any way to avoid using a
        >>class designation in each tr ?[/color]
        >
        >
        > http://moreshit.usenetshit.info/alte...or-thingy.shit[/color]

        still too much work, and classes are more intuitive
        [color=blue]
        >
        >[color=green]
        >>(yes, it is for tabular data !)[/color]
        >
        >
        > thats what they all say
        >[/color]
        columns are:
        Date Location results

        looks like tabular data to me, maybe even to you.


        --
        Bill Drescher
        william {at} TechServSys {dot} com

        Comment

        • Brian

          #5
          Re: odd/even table rows

          bill drescher wrote:
          [color=blue]
          > I have a long table and I want to have the alternating rows
          > slightly different colors for clarity.
          >
          > Is there any way to avoid using a class designation in each tr ?[/color]

          Not until CSS 3 is adopted. Hold your breath. ;-)

          --
          Brian (remove ".invalid" to email me)

          Comment

          • Stan Brown

            #6
            Re: odd/even table rows

            "bill drescher" <nobody@Spamcop .net> wrote in
            comp.infosystem s.www.authoring.stylesheets:[color=blue]
            >I have a long table and I want to have the alternating rows slightly
            >different colors for clarity.
            >
            >Is there any way to avoid using a class designation in each tr ?[/color]

            You don't have to class _every_ tr, but you do have to class either
            each even row or each odd row. There's no way out there that works
            in IE.

            --
            Stan Brown, Oak Road Systems, Tompkins County, New York, USA
            DRAGON222 menjadi pusat resmi terunggul Sportsbook Digital. Sistem cepat respon, tampilan sangat lancar anti lag, dan kemungkinan menang terjadi pada tekad kuat anda.

            HTML 4.01 spec: http://www.w3.org/TR/html401/
            validator: http://validator.w3.org/
            CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
            2.1 changes: http://www.w3.org/TR/CSS21/changes.html
            validator: http://jigsaw.w3.org/css-validator/

            Comment

            • Stan Brown

              #7
              Re: odd/even table rows

              "Stan Brown" <the_stan_brown @fastmail.fm> wrote in
              comp.infosystem s.www.authoring.stylesheets:[color=blue]
              >"bill drescher" <nobody@Spamcop .net> wrote in
              >comp.infosyste ms.www.authoring.stylesheets:[color=green]
              >>I have a long table and I want to have the alternating rows slightly
              >>different colors for clarity.
              >>
              >>Is there any way to avoid using a class designation in each tr ?[/color]
              >
              >You don't have to class _every_ tr, but you do have to class either
              >each even row or each odd row. There's no way out there that works
              >in IE.[/color]

              Sorry -- that last sentence makes no sense. What I meant to say was
              that no way out there will work with IE, _other_ than classing each
              even row or classing each odd row. For instance, if you class each
              even row with <tr class="even">, your CSS would be:

              table tr td { /* odd row stuff */ }

              table tr.even td { /* even row stuff */ }

              (As others have posted, the real solution is CSS3, but hardly any
              browsers support it. Since IE doesn't, and IE users dominate the
              market, it hardly matters what other browsers -- if any -- support
              CSS3.)

              --
              Stan Brown, Oak Road Systems, Tompkins County, New York, USA
              DRAGON222 menjadi pusat resmi terunggul Sportsbook Digital. Sistem cepat respon, tampilan sangat lancar anti lag, dan kemungkinan menang terjadi pada tekad kuat anda.

              HTML 4.01 spec: http://www.w3.org/TR/html401/
              validator: http://validator.w3.org/
              CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
              2.1 changes: http://www.w3.org/TR/CSS21/changes.html
              validator: http://jigsaw.w3.org/css-validator/

              Comment

              • JayB

                #8
                Re: odd/even table rows


                "bill drescher" <nobody@Spamcop .net> wrote in message
                news:10fm5d2smd aahe9@corp.supe rnews.com...[color=blue]
                > brucie wrote:
                >[color=green]
                > > in post: <news:10flrhtsi hsnifb@corp.sup ernews.com>
                > > bill drescher <nobody@Spamcop .net> said:
                > >
                > >[color=darkred]
                > >>I have a long table and I want to have the alternating rows slightly
                > >>different colors for clarity. Is there any way to avoid using a
                > >>class designation in each tr ?[/color]
                > >
                > >
                > > http://moreshit.usenetshit.info/alte...or-thingy.shit[/color]
                >
                > still too much work, and classes are more intuitive
                >[color=green]
                > >
                > >[color=darkred]
                > >>(yes, it is for tabular data !)[/color]
                > >
                > >
                > > thats what they all say
                > >[/color]
                > columns are:
                > Date Location results
                >
                > looks like tabular data to me, maybe even to you.[/color]

                Brucie's reply looks like sarcasm to me. Maybe not to you.

                --
                JayB


                Comment

                • bill drescher

                  #9
                  Re: odd/even table rows

                  Stan Brown wrote:[color=blue]
                  > "Stan Brown" <the_stan_brown @fastmail.fm> wrote in
                  > comp.infosystem s.www.authoring.stylesheets:
                  >[color=green]
                  >>"bill drescher" <nobody@Spamcop .net> wrote in
                  >>comp.infosyst ems.www.authoring.stylesheets:
                  >>[color=darkred]
                  >>>I have a long table and I want to have the alternating rows slightly
                  >>>different colors for clarity.
                  >>>
                  >>>Is there any way to avoid using a class designation in each tr ?[/color]
                  >>
                  >>You don't have to class _every_ tr, but you do have to class either
                  >>each even row or each odd row. There's no way out there that works
                  >>in IE.[/color]
                  >
                  >
                  > Sorry -- that last sentence makes no sense. What I meant to say was
                  > that no way out there will work with IE, _other_ than classing each
                  > even row or classing each odd row. For instance, if you class each
                  > even row with <tr class="even">, your CSS would be:
                  >
                  > table tr td { /* odd row stuff */ }
                  >
                  > table tr.even td { /* even row stuff */ }
                  >
                  > (As others have posted, the real solution is CSS3, but hardly any
                  > browsers support it. Since IE doesn't, and IE users dominate the
                  > market, it hardly matters what other browsers -- if any -- support
                  > CSS3.)
                  >[/color]

                  Thanks, that cut the work in half and is educational to boot.
                  Thank goodness for global find and replace as that makes the rest of the
                  job easy. (not a css construct, just HTML-Kit)

                  --
                  Bill Drescher
                  william {at} TechServSys {dot} com

                  Comment

                  Working...