View Full Version : Have a table's height expand to fit content area

04-25-2006, 09:51 PM
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" >
<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>
<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>
<td width="15px"></td>
<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>
Edit/Delete Message

Dan Williamson
04-25-2006, 10:12 PM
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.

04-26-2006, 01:32 PM
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

04-26-2006, 01:48 PM
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.