I am coding a weblog with PHP and MySQL. On the page that displays the weblog I have two tables side by side. The one on the left contains navigation buttons and will in the future contain other links etc. The one on the right contains the weblog entries as they are retrieved from my database. I can't work out how to make both the tables the same height, because the one on the right will always vary in height relative to the amount of data it displays. Is there some way that I can quantify this before the page is displayed? Code is attached.
Put both of those tables at 100% height, and put them inside another table. The height of 100% will make them fill the table they are in, and when it is stretched, they will still stretch to fit.
Hope this helps. I can provide some code, if needed.
Thanks for that. I would be grateful for some code as I am not sure how to do the outer table.
I'm not completely sure if this is what you're after but it would do the job just as well. Apologies if I've got the wrong end of the stick.
<table align="left" border="1" cellspacing="0" cellpadding="0" width="100%"> <tr> <td align="left" valign="top" height="100%"> <table align="left" border="1" cellspacing="0" cellpadding="0" width="25%" height="100%"> <tr> <td align="left" valign="top"> <p>navigation</p> </td> </tr> </table> <table align="left" border="1" cellspacing="0" cellpadding="0" width="75%" height="100%"> <tr> <td align="left" valign="top"> <p>blog</p> </td> </tr> </table> </td> </tr> </table>
Many thanks for all the help I have got it sorted now.