IE css - last table row to expand to fill remaining height -
given html following, how can last row take remaining height, , have n-1 first rows take height need?
this seems work in chrome, not in firefox2 or ie6/7/8.
<table> <tr> <td rowspan="5"><div style="border: 1px solid #cdcdcd; width: 100px; height: 300px;"/></td> <td/> </tr> <tr> <td>one</td> </tr> <tr> <td>two</td> </tr> <tr> <td>three</td> </tr> <tr> <td>full</td> </tr> </table>
so, idea last row, "full" in it, should tall, , other rows, "one", "two" , "three" should small possible.
i've tried stuff putting exact heights on rows, "<tr style="height:20px;"> , i've tried 100% height on last row, no luck far!
update:
this layout going used varying types of content, , intention table size content. div tall, height determines table's height, othertimes div short, rows (one, two, three) determine table's height.
if javascript ok, use jquery , find top position of last row , position of bottom of window or element. difference should set height of last row.
i didn't code yet, because wasn't sure if looking table inside of object or have fill bottom of window. can if you'd more detail.
Comments
Post a Comment