change the look of the dynamic table

I had the dynamic table. I want to change the look of the table. I am facing two challenges

1. To change the background color of header

I tried by overriding the css of the header "table.Tbl th.TblColHdr" but this did not help me.

2. To change the color of the alternate rows

Could any one help me on this regard

[345 byte] By [shannu] at [2007-11-26 11:17:59]
# 1

we hav same requirement in our application also:

for this what we did is:

1>first get the total num of records which u r going to display.

2> iterate through it using for loop.

3>

see

for( int i=0;i<records.size();i++)

{

if((i%2)==0){%>

<tr >

<%}

else{ %>

<tr bgcolor="#eeeeee">

<%}

%>

}

}

it'll work . try with it.

surendra_j2ee at 2007-7-7 3:33:15 > top of Java-index,Development Tools,Java Tools...
# 2
can u tell me where should I keep the code given above.
shannu at 2007-7-7 3:33:15 > top of Java-index,Development Tools,Java Tools...