By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,795 Members | 1,660 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,795 IT Pros & Developers. It's quick & easy.

Alternate Colors - Cumulative

P: 12
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
Share this Question
Share on Google+
1 Reply


100+
P: 143
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.