Results 1 to 4 of 4

Thread: Table Not Working

  1. #1
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Table Not Working

    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?

    [code]
    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>

  2. #2
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    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.

  3. #3
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Wierd! Ug it's in a php file so it wasn't updating unless uploaded... Thanks looks pretty huh? haha

  4. #4
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •