[Solved] Is this written ok?
Posted: Tue Aug 16, 2005 3:14 pm
I wonder if there is a better way of doing this.
I want a table cell to be one of two possible colours and although the code above works I’m not sure if it’s properly written. I have given the main table on the page the colour grey so that all I need to do is change the colour of the cell once.
Thanks for any advice.
B
Code: Select all
$output_value1 = "ticked";
<td
<?PHP if ($output_value1 == "ticked") { ?>
class="calendar">1 <? } else {?> >1 </td> <? }?>Thanks for any advice.
B
Code: Select all
Css
.calendar {
background-color: #FFCC00;
}
.calendartablebackground {
background-color: #CCCCCC;
}