Home > Web Front-end > HTML Tutorial > How to solve the problem that the webpage produced by DW is displayed in the center in IE and the FF is displayed in the left_html/css_WEB-ITnose

How to solve the problem that the webpage produced by DW is displayed in the center in IE and the FF is displayed in the left_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:10:49
Original
1522 people have browsed it


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;  }
 
-->


回复讨论(解决方案)

没看代码 不过觉得你可能想要的是这个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

Post a navigation bar. The display in IE is different from that in FF. I found a problem when I started doing it. How can I make it display the same?


CSS issue