Here is css, with a little help. This is better but problem is that #calendar td sets not only first row which is the days of the week - but all numbers of the month are the same.
The thd2 colors the background, but still trying to color and size the month #'s
I'm finding it will not allow me to do this, and it forces the same color as #calendar td Is there a way around this?
That, and how can I highlight background of the current day?
The CLASS for the current day,
#calendar {
border: 1px solid #E2E2E2;
margin: 0 auto;
}
#calendar th {
background: #6F0392;
color: #fff;
}
#calendar thd {
background: #FFFF00;
color: #fff;
}
#calendar td {
border: 1px solid #E2E2E2;
width: 30px;
color: #6F0392;
font-weight: bold;
text-align: center;
}
<?php
//Render the Month and Year values current if not available.
if ((!$Month)&&(!$Year)) {
$Month = date("m");
$Year = date("Y");
}
// Calculate the Month being viewed.
$Timestamp = mktime (0,0,0, $Month, 1, $Year);
$MonthName = date("F", $Timestamp);
// Create a table that presents the right month
print("<table id=\"calendar\">");
print("<tr><th colspan=\"9\">$MonthName $Year</th></tr>");
print ("<tr>
<td>S</td>
<td>M</td>
<td>T</td>
<td>W</td>
<td>T</td>
<td>F</td>
<td>S</td>
</tr>\n");
$MonthBegin = date("w", $Timestamp);
if ($MonthBegin == 0){
$MonthBegin=7;
}
$EndDay= date("d", mktime(0,0,0, $Month+1, 0, $Year));
$BeginDate = -$MonthBegin;
for ($k = 1; $k <=6; $k++) {//Print 6 total rows.
print("<tr class=\"thd\" </tr>");
for ( $i=1; $i <=7; $i++){//With 7 cols
$BeginDate++;
if(($BeginDate <=0)||
($BeginDate > $EndDay)){
print ("<TD BGCOLOR=#E8E8E8>
  </TD>");
}elseif(($BeginDate >=1) &&
($BeginDate <=$EndDay)) {
print ("<TD ALIGN=CENTER>
$BeginDate </TD>");
}
}
print("</TR>\n");
}
print ("</TABLE>\n");
//Create the form.
?>