我有一个带有class=list的表,它输出上传到服务器中的文件,它是使用php.The动态创建的。另一个div.The代码是
<div class="list">
<table>....php code for table...</table>
</div>我已经将div列表定位在一个固定的position.The css文件中
.list{background:#66CDAA;width:20cm;position:fixed;top:3cm;left:11cm;}问题是,如果表格变得太大,页面不会向下滚动。我试过了:
body{overflow:auto}但它不起作用。作为一个警报本机解决方案,我知道我可以添加到.list中
.list{overflow:auto;height:something;}但是,列表会有一个固定的高度,这是我不想要的,而且表格也会滚动,而不是页面。那么还有其他选择吗??
发布于 2012-07-09 02:41:18
试试这个:
<div class="listcontainer"><div class="list"><table>...</table></div></div>CSS:
.listcontainer {
position: fixed;
width: 20em;
top: 3cm;
left: 11cm;
bottom: 3cm;
right: 11cm;
overflow: auto;
} /* adjust right and bottom to be what the maximum size should be */
.list {
background-color: #66cdaa;
max-height: 100%;
}https://stackoverflow.com/questions/11385597
复制相似问题