I'm trying to create a generic style for all tables including table headers and table footers using CSS. Table and TH work, but I can't seem to get THEAD or TFOOT to work. I followed what seem to be specifications for the table design by placing the <thead> <tfoot> <tbody> in that order.
1) The first problem is that in both firefox and ie the footer row is being displayed immediately after the header, which after researching around the web shouldn't happen. Even though the tag is immediately following the <thead> it's supposed to be positioned at the bottom of the table.
2) CSS styles are not being applied to the <thead> or <tfoot>.
Below is my XHTML and CSS...
<table runat="server" id="tblMain">
<thead>
<tr>
<th colspan="2">
Abstract Submission</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="2"><asp:Button ID="cmdSubmit" Runat="server" Text="Submit Abstract"></asp:Button></td>
</tr>
</tfoot>
<tbody>
<tr>
<td>Subject</td>
<td>
<asp:TextBox id="txtSubject" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>Title</td>
<td>
<asp:TextBox id="txtTitle" runat="server" TextMode="MultiLine" ></asp:TextBox></td>
</tr>
<tr>
<td>Category</td>
<td>
<asp:DropDownList id="cmbCategory" runat="server"></asp:DropDownList></td>
</tr>
<tr>
<td>Summary</td>
<td>
<asp:TextBox id="txtSummary" runat="server" TextMode="MultiLine"></asp:TextBox></td>
</tr>
<tr>
<td>Body</td>
<td>
<asp:TextBox id="txtBody" runat="server" TextMode="MultiLine"></asp:TextBox></td>
</tr>
</tbody>
</table>
CSS:
table
{
/*background-image: url("/ebusiness/Images/AptifyTableBackground_Medium.png");
background-repeat:repeat-x;
background-color: #e0cdd2;
border: solid 1px #3d6dcc;*/
border-collapse: collapse;
width: 90%;
color:#0276b3;
}
table td
{
padding:7px;
}
table th
{
background-color: #efe7d2;
/*background-image: url("/ebusiness/Images/AptifyTableHeader.png");
background-repeat:repeat-x;*/
color:#333333;
/*border: solid 1px 1px 1px 1px #3d6dcc;*/
font-size:10pt;
padding-left: 10px;
text-align:left;
font-weight:normal;
text-indent:10px;
height:20px;
line-height:20px;
}
TFOOT
{
text-align:right;
background-color:Black;
}
* If anyone can help it would be greatly appreciated.
Thanks,
Krys