> Have site with alternating colours in dynamic website using php. Want to
> change the code to css.
>
> code as follows:
> $bg = ($bg=='#eeeeee' ? '#F9FBF9' : '#eeeeee'); // Switch the background
> color.
> <tr bgcolor="$bg">
>
> I know it is a table, but it for tabulating results. It is one of pages in
> Zen Cart which I am designing to my own design.
>
> So how do I change the above to something more style friendly?
>
> Cheers
>
> Ian
How about setting a different class for the odd and even rows?
<tr class="odd_row">
or
<tr class="even_row">
Then the CSS:
tr.odd_row {
background-color: #eeeeee;
}
tr.even_row {
background-color: #f9fbf9
}
- Matt
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/