Table styling problem

Associate
Joined
20 Oct 2005
Posts
112
Hi, I'm having an issue with a table nested within another table in FF and Chrome, but displays as I want in IE. Chrome doesn't seem to want to use my padding values and instead shrinks the BG colour to the edge of the text.

Code:
<table style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-BOTTOM: 1px; PADDING-TOP: 1px" cellspacing="0" cellpadding="0" width="100%">
    <tbody>
      <tr bgcolor="#330000">
        <td align="right" colspan="4"><font style="FONT-WEIGHT: bold; FONT-VARIANT: small-caps" color="#FFFFFF">gfd gfag  gfag fa</font></td>
      </tr>

      <tr bgcolor="#D9D7C5">
        <td><b>Project:</b></td>

        <td>gfsdgfdas</td>

        <td><b>Date:</b></td>

        <td>gfgsafd</td>
      </tr>

      <tr bgcolor="#ECEBE1">
        <td><b>Client:</b></td>

        <td>gafdgfda</td>

        <td><b>Value:</b></td>

        <tdhgafdhfdh</td>
      </tr>

      <tr bgcolor="#D9D7C5">
        <td><b>Application:</b></td>

        <td>hgsdfds</td>

        <td><b>Sensor:</b></td>

        <td>hgsafdhsfd</td>
      </tr>
    </tbody>
  </table>

I know it's an awful mish-mash of inline CSS and HTML, but it's what I had to work with. Can anyone see what's causing me grief?
 
Ahh, I had to amend the table contents as they are sensitive in nature. Must have accidentally deleted the td> :)

With further testing my table seems to act correctly if I move the inline CSS into the <td>. This really isn't desirable for me atm, due to the number of tables. Is there something I'm missing from making the table inherit the CSS from it's <table> tag?
 
I hear what you're saying but unfortunately, for the time being, it's not possible. This is a website with content added from all across Europe. We have a CMS system but unfortunately that's more bug ridden than Clear Sky and the standard CSS we've got is pretty awful... hence having to deal with everything via inline CSS or deprecatted HTML.

That is one of the nested tables but I can't really paste anymore of the HTML on here atm. I will try to later...
 
Back
Top Bottom