日期:2014-05-17  浏览次数:20726 次

DW制作的网页在IE显示居中 FF显示居左问题怎么解决
<style type="text/css">
body {TEXT-ALIGN: center; } 
* { padding: 0; margin: 0; }
li { list-style: none; }
img { border: none; }
.box {
width: 930px;
height: 250px;
overflow:hidden;
position:absolute;
margin: 2px auto 0;
background: #ccc;
visibility: visible;
margin-left:37px
}
.box ol { position: absolute; left:800px; bottom: 5px; z-index: 2; }
.box ol li { float: left; margin-right: 3px; display: inline; cursor: pointer; background: #cfebfc; border: 1px solid #0073bc; padding: 2px 6px; color: #0073bc; font-family: arial; font-size: 12px; }
.box .active { padding: 3px 8px; font-weight: bold; color: #ffffff; background: #2a96e2; position: relative; bottom: 2px; }
.box ul {
position: absolute;
top: 0;
left:-3px;
z-index: 1;
width: 4652px;
height: 159px;
visibility: visible;
}
.box ul li { width: 930px; height: 250px; float: left; }
.box ul img { float: right; width: 930px; height: 250px; }
 
-->
</style>


------解决方案--------------------
没看代码 不过觉得你可能想要的是这个http://www.cnblogs.com/WuQiang/archive/2011/08/23/2150240.html
------解决方案--------------------
.box {
width: 930px;
height: 250px;
overflow:hidden;
position:absolute;
margin: 2px auto 0;
background: #ccc;
visibility: visible;
margin:0 auto;
}


试试

不好猜

楼主把html贴出来
------解决方案--------------------
帖简化版的css 和HTML


------解决方案--------------------
确认你的dtd添加了没有
<!doctype html>
------解决方案--------------------
给三个table都加上margin:0 auto;
------解决方案--------------------
楼主,你这个css和HTML有关系吗
------解决方案--------------------
兼容性问题吧,写个通用的CSS