HighDots Forums  

odd/even table rows

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


Discuss odd/even table rows in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
bill drescher
 
Posts: n/a

Default odd/even table rows - 07-18-2004 , 04:40 PM






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

Reply With Quote
  #2  
Old   
Ben Shimmin
 
Posts: n/a

Default Re: odd/even table rows - 07-18-2004 , 04:45 PM






bill drescher <nobody (AT) Spamcop (DOT) net>:
Quote:
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 !)
<URL:http://www.alistapart.com/articles/zebratables/>

In short, no.

b.

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


Reply With Quote
  #3  
Old   
bill drescher
 
Posts: n/a

Default Re: odd/even table rows - 07-18-2004 , 07:28 PM



brucie wrote:

Quote:
in post: <news:10flrhtsihsnifb (AT) corp (DOT) supernews.com
bill drescher <nobody (AT) Spamcop (DOT) net> said:


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 ?


http://moreshit.usenetshit.info/alte...or-thingy.shit
still too much work, and classes are more intuitive

Quote:

(yes, it is for tabular data !)


thats what they all say

columns are:
Date Location results

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


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


Reply With Quote
  #4  
Old   
Stan Brown
 
Posts: n/a

Default Re: odd/even table rows - 07-18-2004 , 10:57 PM



"bill drescher" <nobody (AT) Spamcop (DOT) net> wrote in
comp.infosystems.www.authoring.stylesheets:
Quote:
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 ?
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
http://OakRoadSystems.com/
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/


Reply With Quote
  #5  
Old   
Stan Brown
 
Posts: n/a

Default Re: odd/even table rows - 07-19-2004 , 09:59 AM



"Stan Brown" <the_stan_brown (AT) fastmail (DOT) fm> wrote in
comp.infosystems.www.authoring.stylesheets:
Quote:
"bill drescher" <nobody (AT) Spamcop (DOT) net> wrote in
comp.infosystems.www.authoring.stylesheets:
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 ?

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.
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
http://OakRoadSystems.com/
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/


Reply With Quote
  #6  
Old   
JayB
 
Posts: n/a

Default Re: odd/even table rows - 07-19-2004 , 01:25 PM




"bill drescher" <nobody (AT) Spamcop (DOT) net> wrote

Quote:
brucie wrote:

in post: <news:10flrhtsihsnifb (AT) corp (DOT) supernews.com
bill drescher <nobody (AT) Spamcop (DOT) net> said:


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 ?


http://moreshit.usenetshit.info/alte...or-thingy.shit

still too much work, and classes are more intuitive



(yes, it is for tabular data !)


thats what they all say

columns are:
Date Location results

looks like tabular data to me, maybe even to you.
Brucie's reply looks like sarcasm to me. Maybe not to you.

--
JayB




Reply With Quote
  #7  
Old   
bill drescher
 
Posts: n/a

Default Re: odd/even table rows - 07-20-2004 , 09:31 AM



Stan Brown wrote:
Quote:
"Stan Brown" <the_stan_brown (AT) fastmail (DOT) fm> wrote in
comp.infosystems.www.authoring.stylesheets:

"bill drescher" <nobody (AT) Spamcop (DOT) net> wrote in
comp.infosystems.www.authoring.stylesheets:

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 ?

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.


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

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


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.