Re: CSS for Color in Alternating Tables Rows

by Eric Pederson <e_dog_(at)yahoo.com>

 Date:  Sun, 27 Jul 2003 18:13:02 -0700 (PDT)
 To:  hwg-style(at)mail.hwg.org
  todo: View Thread, Original
a more programmatic example using JavaScript to switch CSS classes:

http://www.zomething.com/umi2-autorows.htm

[check out the page source for the details]


cheers


Eric





--- Eric Pederson <e_dog_(at)yahoo.com> wrote:
> 
> example:  http://www.zomething.com/umi1.htm
> 
> This can be achieved using different classes for different rows and
> having different background color for the classes.
> 
> This technique does not automatically alternate colors, but I suspect
> you could partially automate this using a little javascript to
> alternate the class="" on each successive row.
> 
> tr.red
> 
> {
> 
> background-color: red;
> 
> }
> 
>  
> 
> tr.yellow
> 
> {
> 
> background-color: yellow;
> 
> }
> 
> </style>
> 
> <table>
> 
> <tr class="red"> <td></td><td>...</tr>
> 
> <tr class="yellow"> <td></td><td>...</tr>
> 
>  
> 
> hope that helps
> 
>  
> 
> Eric
> 
>  
> 
> 
> ---------------------------------
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software


=====
Eric Pederson

___________________________________
People networking at:  
http://ryze.com/view.php?who=EricJPederson

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

HWG hwg-style mailing list archives, maintained by Webmasters @ IWA