Make table td to occupy remaining space

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Himanshu Garg
    New Member
    • Mar 2012
    • 1

    Make table td to occupy remaining space

    I have written the following code :
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

    <table style = "width : 500px; height : 100%; border : 1px solid black;">
    <tr>
    <td style = "width : 300px; height : 100%; border : 1px solid;">
    1st TD

    </td>
    <td rowspan = 2 style = "border : 1px solid;">

    </td>
    <td rowspan = 2 style = "border : 1px solid;">
    Sidebar
    <br />
    <br />
    <br />
    Sidebar
    </td>
    </tr>
    <tr>
    <td style = "width : 300px; border : 1px solid;">
    Last TD
    </td>
    </tr>
    </table>


    I want that 1st TD should expand as I write text into it and the remaining space should be occupied by last TD.

    This code works perfectly in Firefox but not in IE. IE equally divides 1st and Last TD across the rowspanned TDs.
Working...