White space below a nested table

I'm sure this has been asked an answered, however, I am finding difficult to remove the white space that appears below a nested table.  In otherwords, I would like the table to fill the entire cell (<td>) however, it seems to leave a line, below the nested table in the cell.  Is there a tag or setting that will illiminate this behavior





Answer this question

White space below a nested table

  • Tony Wu

    That works to make the nested table become 100% of the cells height, however, the Cell's height still remains the height of the table + the rows height. 

    In my case, I have a DataList that is performing as a multi-lined data grid.  There are two lines of data for each item, Building Data on the first, building address on the second.  Each line has a different format, thus the need to nest a <Table> in each row

    Ie:

    <table>
       <tr>
          <td>
             <table>
                <tr>
                   <td></td>
                   <td></td>
                   <td></td>
                   <td></td>
                </tr>
             </table>
          </td>
       </tr>
       <tr>
          <td>
             <table>
                <tr>
                   <td></td>
                   <td></td>
                </tr>
             </table>
          </td>
       </tr>
    </table>

    Since I wish to maximize real estate, I need for each line to display immediately after the prior line.  With your solution, each nested table row is still 2X <td> high, only valigned to the middle, no matter what I set the <td> height to. 

    How do I get the nested table row to be just 1X the <td> height Or am I missing something obvious and need a board up side my head

  • Johan L

    <table cellpadding="0">
     <tr>
      <td style="background-color: #00FF00;">
    <table width="100%" height="100%" cellspacing="0" border="0">
     <tr>
      <td style="background-color: #FF0000;">
    aaaaaaaaa
      </td>
     </tr>
    </table>
      </td>
     </tr>
    </table>



  • grim1208

    Ok, I need the board upside the head..

    It seemed that with a little tweeking, Height="100%" cellpadding="0" cellspacing="0" and border="0" on table properties your solution shrinks the cell height down to an acceptable level.   However, the cell height still does not display as it would if were in a un-nested table. Not sure why, but accepting it as a "feature" for now.


  • timpg

    For all of you having this problem, as i did, simply make sure that <td> and </td> are on the same line as your cell content. For example:

    <td><table>
        <tr>
            <td>blah</td>
        </tr>
    </table></td>

  • White space below a nested table