Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/87.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
具有固定列的限制高度HTML表_Html_Css_Html Table - Fatal编程技术网

具有固定列的限制高度HTML表

具有固定列的限制高度HTML表,html,css,html-table,Html,Css,Html Table,我有一个大的表,我想应用一个最大高度,但我很难做到这一点,因为最左边的列被设置为固定到位(使用绝对定位) 当我给它的容器div一个max height时,绝对定位的div溢出,看起来很糟糕。HTML大致如下所示 <div style="max-height: 100px"> <table> <tr> <td class="fixed">blah</td> <td class="not_fixed">bla

我有一个大的表,我想应用一个最大高度,但我很难做到这一点,因为最左边的列被设置为固定到位(使用绝对定位)

当我给它的容器div一个max height时,绝对定位的div溢出,看起来很糟糕。HTML大致如下所示

<div style="max-height: 100px">
<table>
  <tr>
    <td class="fixed">blah</td>
    <td class="not_fixed">blah!</td>
  </tr>
</table>
</div>

废话
废话!
这是一个更清楚地说明我的问题的例子:


你试图在
最大高度
内设置
绝对
元素,这是在攻击自己的脚。尝试将
absolute
更改为
relative
@DevlshOne:这样第一列就不会被冻结。我认为作者应该研究分页以实现他们想要的。@im1尽管你是对的,但它不会被冻结。然而,第一列远高于他在表格其余部分设定的100像素的限制。这是一个列出大量房间(约90间房间)的预订系统。分页在这种情况下没有多大意义。@DevlshOne:这就是他的问题所在。。。