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

网站用div+css开发页面,在IE中能正常显示,但是在Firefox中不正常,所有页面都错位
问题网站:http://www.skygallery.cn
问题描述:本站用div+css开发页面,在IE中能正常显示,但是在Firefox中不正常,所有页面都错位

问题解决:请大家帮看看网站的css代码要怎么改才能在IE和firefox中都能正常显示呢?
css代码(估计有问题的代码):
.tab01 {
width: 767px;
border: 1px solid #666666;
left: 100px;
top: 1px;
right: 100px;
bottom: 1px;
height: 88px;
margin:auto;
background-color: #000000;
}
.contentindex2 {
font-size: 14px;
color: #CC0000;
background-color: #FFFFE6;
}
.contentindex1 {
font-size: 12px;
line-height: 22px;
color: #003399;
background-color: #E6F2FF;
text-indent: 6px;
}
.contentlist2 {
width: 148px;
border: 1px dashed #CCCCCC;
float: left;
margin: 1px;
}

.tabnav {
width: 767px;
border: 1px solid #666666;
left: 100px;
top: 1px;
right: 100px;
bottom: 1px;
background-color: #F0F0F0;
height: 24px;
text-align: center;
vertical-align: baseline;
line-height: 24px;
margin:auto;
}
.tabmjsh {
left: 0px;
top: 0px;
right: 0px;
bottom: 0px;
background-color: #F0F0F0;
line-height: 1px;
}
.tableft2 {
width: 170px;
border: 1px dashed #CCCCCC;
bottom: 1px;
height: 130px;
text-align: left;
vertical-align: baseline;
line-height: 24px;
text-indent: 10px;
float:left;
padding: 2px;
margin: 2px;
}
.tableft {
width: 275px;
border: 1px dashed #CCCCCC;
bottom: 1px;
height: 130px;
text-align: left;
vertical-align: baseline;
line-height: 24px;
text-indent: 10px;
float:left;
padding: 2px;
margin: 2px;
}
.tableft1 {
float:left;
padding: 2px;
margin: 2px;
}

.tabbottom{
background-position: center;
text-align: center;
width: 767px;
border: 1px solid #666666;
left: 100px;
top: 1px;
right: 100px;
bottom: 1px;
background-color: #F0F0F0;
height: 60px;
margin:auto;
vertical-align: middle;
line-height: 25px;
color: #003366;
font-size: 14px;
}
.content {
text-align: center;
padding: 2px;
width: auto;
}

.titlemjsh{
padding-top: 5px;
padding-bottom: 5px;
padding-left: 10px;
}

------解决方案--------------------
left: 100px; 
top: 1px; 
right: 100px; 
bottom: 1px; 
这个有问题
定位只有两项就可以了~

其他的没细细看
------解决方案--------------------
请在有定义float的div后,结束浮动的后面加入
<div style="clear: both"></div>