Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Aug 2005
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Have a table's height expand to fit content area

    Hello,
    I have my page laid out with a table.
    bascially a 2 column page. If the right column td is big, the left td will also be the same size since its a table. my problem lies that i have a left nav, whose 1st row contains 'top rounded corners' and 3rd row contains the 'bottom rounded corners', and I want the middle row to take up the remaining space heightwise. I cannot get it to do that. it takes up only as much spaace as it needs, and specifying height="100%" on that row or table cell doesnt work.

    this is how my page bascially looks like
    ....
    <td id="leftnavHolder">
    <table cellspacing="0px" cellpadding="0px" border="0px" >
    <tr>
    <td height="15px" width="15px"><img src="images/tl.gif"/></td>
    <td height="15px" ></td>
    <td height="15px" width="15px"><img src="images/tr.gif"/></td>
    </tr>
    <tr>
    <td width="15px"></td>
    <td height="100%???">
    <ul id="leftnavList">
    <li id="current" class="leftnavItem">» <a href="index.html">Home</a></li>
    <li class="leftnavItem"><a href="dccfandyou.html">DCCF and You</a></li>
    <li class="leftnavItem"><a href="legacyleave.html">What Legacy will you Leave</a></li>
    <li class="leftnavItem"><a href="startfund.html">Starting a Fund</a></li>
    <li class="leftnavItem"><a href="typefunds/Unrestricted.html">Types of Funds</a></li>
    <li class="leftnavItem"><a href="managingfund/Accounting.html">Managing Your Funds</a></li>
    <li class="leftnavItem"><a href="professional/WhyWorkwithUS.html">For Professional Advisors</a></li>
    <li class="leftnavItem"><a href="board.html">Board of Directors</a></li>
    </ul>
    </td>
    <td width="15px"></td>
    </tr>
    <tr>
    <td height="15px" width="15px"><img src="images/bl.gif"/></td>
    <td height="15px" ></td>
    <td height="15px" width="15px"><img src="images/br.gif"/></td>
    </tr>
    </table>
    </td>
    Edit/Delete Message
    Last edited by arianhojat; 04-26-2006 at 01:32 PM.

  • #2
    New Coder
    Join Date
    Apr 2006
    Location
    Manchester, UK
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You could see how much content there is in and set a distinctive say 400px height or whatever the height it but add say 20px onto the bottom.

  • #3
    New Coder
    Join Date
    Aug 2005
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    but the content in it is dynamic so i wont know offhand what it is.

    the only thing i came up with is to have the top and bottom corners in their own rows outside of the nested table and in the table that holds the layout. then the next row 'knows' how big the content is

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,252
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Tableicious

    I'd say: "don't use tables for layout purposes", but while you're at it, yes, create a row for the top graphics, a row for both columns (expands to fit content: no set height) and a row for the bottom graphics.
    Regards,
    Ronald.
    ronaldvanderwijden.com


  •  

    Posting Permissions

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