Log in

View Full Version : Table Not Working



tomyknoker
03-30-2007, 06:25 AM
I have a simple table which I have odd and even class assigned to which make it display a different background colour on each row however it is not workin... It's all just white! Any ideas?



table {
clear: right;
width: 700px;
line-height: 1.4em;
border-collapse: collapse;
border: 4px solid #adbbca;
color: #4f6480;
background: #f0f0f0;
font: small Arial, Helvetica, sans-serif;
}
table caption {
margin: 0;
padding: 0;
color: #032469;
line-height: 2em;
text-align: left;
font-weight: bold;
}
table thead tr {
color: white;
background: #5e7796;
}
table thead tr th {
padding: 1em 1em 1em 1em;
border: 4px solid #adbbca;
}
table thead tr th.left {
text-align: left;
padding: 1em 1em 1em 1em;
border: 4px solid #adbbca;
}
table thead tr th.right {
text-align: right;
padding: 1em 1em 1em 1em;
border: 4px solid #adbbca;
}
table tbody tr {
padding: 5px;
border: 1px solid #adbbca;
}
table tbody th {
padding: 2px;
border: 4px solid #adbbca;
}
table tbody td {
background: #e9ecee;
padding-left: 0.6em;
border-bottom: 4px solid #ccc;
}
table tbody tr.odd {
background: #c4cfdb;
}
table tbody tr.odd td {
background: #f0f0f0;
color: #4f6480;
}
[code]
<table width="700" border="0" cellspacing="0" cellpadding="0">
<caption>MEMBERSHIP STATUS</caption>
</tr>
<thead>
<tr>
<th scope="col" class="left">STATUS</th>
<th scope="col">VIEW</th>
<th scope="col">DOWNLOAD</th>
<th scope="col" class="right">TOTAL</th>
</tr>
</thead>
<tr class="odd">
<td>Approved</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr class="even">
<td>Deleted</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr class="odd">
<td>On Hold </td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr class="even">
<td>Pending</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr class="odd">
<td>Rejected</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr class="even">
<td>Total</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>

codeexploiter
03-30-2007, 07:05 AM
It works perfectly in my PC. Have a look at the screenshot I've attached. I've checked it both in IE 7 and Firefox 2.0.0.3.

tomyknoker
03-30-2007, 07:13 AM
Wierd! Ug it's in a php file so it wasn't updating unless uploaded... Thanks looks pretty huh? haha

tomyknoker
03-30-2007, 08:30 AM
I am trying to stick with em sizing, so the height of the table cells are all relative, is there a way though that I can make the first <tr> and the last <tr> higher than all the other <tr>'s in between?