【发布时间】:2012-10-05 20:40:56
【问题描述】:
我在页面底部有一个包含在 php 中的页脚元素:
<footer>
<h5>Title</h5>
<h6>© Copyright 2012</h6>
</footer>
footer{
width:100%;
height:40px;
font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
background-color:#EEE;
text-align:center;
position:absolute;
bottom:0;
}
这可以按预期将页脚与底部对齐。问题在于页面主要部分中的数据是通过 AJAX 调用加载的,而页脚只是保持在添加 ajax 元素之前的位置。 movieBox 元素默认为空,返回 ajax 调用时填充多个 div。
<div id="movieBox"></div>
<br style="clear:both"/>
是否有解决此问题的唯一方法?还有什么方法吗?感谢您的帮助。
【问题讨论】:
标签: css ajax html position positioning