468,107 Members | 1,448 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,107 developers. It's quick & easy.

Alternate Colors - Cumulative

Dear All

i have dynamic generation of <table>
rt now i have done the <TR> with alternate colors which is a dynamic table.
my requirement is that for every cumulative <tr> i need different color.
ex.

<table>
<tr> <td>a</td><td>1</td> </tr>
<tr> <td>b</td><td>2</td> </tr>
<tr> <td>c</td><td>3</td> </tr>
<tr> <td>d</td><td>4</td> </tr>

<tr> <td>sum1</td><td>10</td> </tr>

<tr> <td>e</td><td>1</td> </tr>
<tr> <td>f</td><td>2</td> </tr>
<tr> <td>g</td><td>3</td> </tr>
<tr> <td>h</td><td>4</td> </tr>

<tr> <td>sum2</td><td>10</td> </tr>
</table>

the rows, a,b,c,d have alternate colors.
row sum1 should be differentiated in diff color. how to do this.?????

PraDz
Oct 3 '06 #1
1 1559
steven
143 100+
Dear All

i have dynamic generation of <table>
rt now i have done the <TR> with alternate colors which is a dynamic table.
my requirement is that for every cumulative <tr> i need different color.
ex.

<table>
<tr> <td>a</td><td>1</td> </tr>
<tr> <td>b</td><td>2</td> </tr>
<tr> <td>c</td><td>3</td> </tr>
<tr> <td>d</td><td>4</td> </tr>

<tr> <td>sum1</td><td>10</td> </tr>

<tr> <td>e</td><td>1</td> </tr>
<tr> <td>f</td><td>2</td> </tr>
<tr> <td>g</td><td>3</td> </tr>
<tr> <td>h</td><td>4</td> </tr>

<tr> <td>sum2</td><td>10</td> </tr>
</table>

the rows, a,b,c,d have alternate colors.
row sum1 should be differentiated in diff color. how to do this.?????

PraDz
Are you saying it already partially works and that rows a,b,c & d already have alternating colours?

If you just need to change sum1, why not give that particular tr a class name and use some CSS to set its colour?
Oct 3 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

5 posts views Thread by aznFETISH | last post: by
reply views Thread by Paolo | last post: by
1 post views Thread by news | last post: by
4 posts views Thread by Matt Larkin | last post: by
1 post views Thread by Solo | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.