表行高度

时间:2011-05-30 20:00:14

标签: html css html-table

我有一个带有表的页面,我希望它的布局如下所示:

+------------+--------------+----------------------------------+
| 200px wide |  300px wide  |         Remaining width          |
|  2 rows    |    1 row     |              1 row               |
|Page height |              | Height of image scaled to width  |
|            +--------------+----------------------------------+
|            |                 Remaining width                 |
|            |                 Remaining height                |
|            |                 1 row, 2 columns                |
+------------+-------------------------------------------------+

除了将桌子的高度限制在页面高度之外,我似乎能够完成所有工作。如何使表格高度等于页面高度?

这是sample page

我可以用jQuery在两分钟内做到这一点,但我真的不想使用Javascript做这么简单的事情。

编辑:仅在Firefox中测试过。它可能会或可能不会在其他浏览器中工作。

1 个答案:

答案 0 :(得分:3)

喜欢这个吗?

<table width="100%" height ="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="200px" rowspan="2">&nbsp;</td>
    <td width="300px">&nbsp;</td>
    <td width="44%">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="2">&nbsp;</td>
  </tr>
</table>
相关问题