跨浏览器的CSS固定定位

1. IE7、Firefox、Opera,都支持CSS的{position:fixed},所以很容易实现。
    不过这里有个小问题的,今天做个右下的div,设置的css样式是{position:fixed;right:0px;bottom:0px;},结果怎么调整div的水平位置在ff都是居中,在IE7能正常显示,调了很长时间,结果是div的的css缺少了width属性,添加上后一切OK!

2、IE6不支持fixed,可以利用容器对溢出内容的处理方式来实现的
<!--[if IE 6]>
<style type="text/css">
html{overflow:hidden;}
body{height:100%;overflow:auto;}
#BottomList{position:absolute;right:0px;}
</style>
<![endif]-->



posted @ 2008-01-17 18:15  Asharp  阅读(538)  评论(1编辑  收藏  举报