但是不能混合使用,选择em和px的时候明智些,
察看效果元素等高问题
采用
http://www.positioniseverything.net/articles/onetruelayout/equalheight有人翻译过来的:
http://www.blueidea.com/tech/web/2006/3210.asp里提到的方法,就不具体解释了。
#container {
overflow: hidden;
}
#container .column {
padding-bottom: 20010px; /* X + padding-bottom */
margin-bottom: -20000px; /* X */
}
#footer {
position: relative;
}
再解决opera 8的bug,代码调整如下
<div id="footer-wrapper">
<div id="footer"></div>
</div>
* html body {
overflow: hidden;
}
* html #footer-wrapper {
float: left;
position: relative;
width: 100%;
padding-bottom: 10010px;
margin-bottom: -10000px;
background: #fff; /* Same as body
background */
}
到此整个过程结束,察看
最终效果,通过w3c 标准型