Hi guys
How can I change the colour of just 1 cell. I have called the class .today
but it isnt changing the background of the actual td cell
thanks in advance
CSS
PHP Code:
table.cal{
width:790px;
table-layout:fixed;
}
.cal th{
text-align:center;
font-size:12px;
padding:0 0 1px;
color:red;
vertical-align:top;
}
.today {
background-color:red;
width:1112px;
height:120px;
border-right:1px solid #fff;
border-bottom:1px solid #fff;
vertical-align:top;
}
line 15
PHP Code:
<table border="0" align="center" class="cal">
<tr>
{foreach from=$days item=i}
<th scope="col">
{$i}
</th>
{/foreach}
</tr>
{foreach from=$cal item=i}
<tr>
{foreach from=$i item=o}
{if ($currentdaydate == $o.num && $currentmonthdate == $months[$month] && $currentyeardate == "$year")}
<td width="140" height="80" valign="middle" align="center" class="today">
{elseif $o.num == null}
<td width="80" height="80" valign="middle" align="center" class="empty" >
{else}
<td width="80" height="80" valign="middle" align="center" >
{/if}
{if $o.num == null}
<h5> </h5>
{else}
<h5>{$o.num}</h5>
{if ($currentdaydate == $o.num && $currentmonthdate == $months[$month] && $currentyeardate == "$year")}
<center><b><br />Today</b></center>
{/if}
{foreach from=$thedaydata item=bd}
{if ($bd.Start|date_format:"%e" == $o.num && $bd.Start|date_format:"%B" == $months[$month] && $bd.Start|date_format:"%Y" == "$year")
}
<center><br /><b><a href=event.php?id={$bd.Dates_ID}>{$bd.Event_Name}</b><br /><Br /></a></center>
{/if}
{if $bd==''}
<br /><center><A href=setupmenu.php>Setup this day</a></center>
{/if}
{/foreach}
{/if}
</td>
{/foreach}
</tr>
{/foreach}
</table>
Bookmarks