There are two ways of doing this:
First method:
HTML Code:
<table id="month">
<thead>
<tr>
<td>Jan</td>
<td>Feb</td>
<td>Mar</td>
<td>Apr</td>
<td>May</td>
<td>Jun</td>
<td>Jul</td>
<td>Aug</td>
<td>Sep</td>
<td>Oct</td>
<td>Nov</td>
<td>Dec</td>
</tr>
</thead>
<tbody>
<tr>
<td>Jan Data</td>
<td>Feb Data</td>
<td>Mar Data</td>
<td>Apr Data</td>
<td>May Data</td>
<td>Jun Data</td>
<td>Jul Data</td>
<td>Aug Data</td>
<td>Sep Data</td>
<td>Oct Data</td>
<td>Nov Data</td>
<td>Dec Data</td>
</tr>
</tbody>
</table>
Second method:
HTML Code:
<table id="month">
<tr>
<th>Jan</th>
<th>Feb</th>
<th>Mar</th>
<th>Apr</th>
<th>May</th>
<th>Jun</th>
<th>Jul</th>
<th>Aug</th>
<th>Sep</th>
<th>Oct</th>
<th>Nov</th>
<th>Dec</th>
</tr>
<tr>
<td>Jan Data</td>
<td>Feb Data</td>
<td>Mar Data</td>
<td>Apr Data</td>
<td>May Data</td>
<td>Jun Data</td>
<td>Jul Data</td>
<td>Aug Data</td>
<td>Sep Data</td>
<td>Oct Data</td>
<td>Nov Data</td>
<td>Dec Data</td>
</tr>
</table>
And the CSS:
PHP Code:
/**
* Same in both examples
*/
#month
{
border-width: 3px;
border-style: solid;
border-collapse: collapse;
border-color: #415065;
background-color: #B6CEFF;
width: 600px;
}
#month td
{
border-width: 1px;
padding: 2px;
border-style: solid;
border-color: #000;
}
/**
* For the First example HTML
*/
#month thead td
{
font-weight: bold;
}
/**
* For the Second example HTML
*/
#month th
{
font-weight: bold;
}
I can't remember which is the preferred method. I think it's the second example. Someone else may be able to expand more on it though.
Bookmarks