[thelist] Alternating Rows
Peter-Paul Koch
gassinaumasis at hotmail.com
Mon Oct 7 15:21:01 CDT 2002
> ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> > From: Ben Dyer
> >
> > Does anybody have any suggestions, comments, ideas on
> > how to approach this problem?
> ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
>
>if you only need to support ie, then using a css expression would do the
>trick. something like this (beware of wrap):
Or use JavaScript, something like
if (document.getElementsByTagName)
var x = document.getElementById('table_id').getElementsByTagName('TR');
else if (document.all)
var x = document.all['table_id'].tags['TR'];
else return; // doesn't work in NN4
for (var i=0;i<x.length;i+=2)
x[i].className = 'evenRow';
Then you have one bunch of TR's without a class and another with
class="evenRow" and you can style them accordingly.
ppk
_________________________________________________________________
Join the worlds largest e-mail service with MSN Hotmail.
http://www.hotmail.com
More information about the thelist
mailing list