【发布时间】:2011-12-22 08:04:56
【问题描述】:
我有一个可以打开多个窗口的应用程序。内容是由 DOM 用 jQuery 动态创建的,但类是静态的。
问题是底部 div 粘在顶部 div 的底部,而不是底部(见下图)。
这里有什么我明显遗漏的东西吗?
.containerDiv {
position: absolute;
left:50px;
top: 60px;
margin-left: auto;
margin-right: auto;
resize: both;
overflow: auto;
}
.topDiv {
position: relative;
top: 0;
height: 60px;
width: 100%;
overflow: hidden;
}
.middlediv {
position: relative;
width: 300px;
height: 300px;
background: red;
}
.bottomDiv {
position: relative;
bottom: 0;
}
看起来是这样的:
--------------------
topDiv
--------------------
bottomDiv
--------------------
middleDiv
--------------------
【问题讨论】:
-
你的 html 是什么样的?
标签: jquery css dom html positioning