Thanks for the response.
This was the fix:
In my mySQL query I alternate the value of $cn from odd to even until it's finished.
My CSS has corresponding styles.
CSS
PHP Code:
tr.odd {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 14px;
background-color: #E0ECFF;
border-top-style: none;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
}
tr.even {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 14px;
background-color: #BDD0FF;
border-top-style: none;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
}
.initial {
background-color: #DDDDDD; color:#000000
}
.normalodd {
background-color: #E0ECFF
}
.normaleven {
background-color: #BDD0FF
}
.highlight {
background-color: #C1FFC4;
}
PHP Code:
<tr class="<?php echo $cn;?>" onMouseOver="this.className='highlight'";"this.style.cursor='pointer'"
onMouseOut="this.className='normal<?php echo $cn;?>'" onclick="parent.location='edittable.php?product=<?php echo $row_Recordset1['no']; ?>'" >
<td><?php echo $row_Recordset1['product']; ?></td>
<td><?php echo $row_Recordset1['description']; ?></td>
<td><?php echo $row_Recordset1['department']; ?></td>
<td><?php echo $row_Recordset1['price']; ?></td>
</tr>
<?php
if ($cn == "odd") {
$cn = "even";}
else {
$cn = "odd";
}
} while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
Bookmarks