gpt4 book ai didi

css - IE中的网站位置错误

转载 作者:太空宇宙 更新时间:2023-11-04 05:28:45 24 4
gpt4 key购买 nike

有问题的网站是DCWB

忘记概述问题

基本上一切在 FF 中看起来都很好,但是当我在 IE 中查看时,大多数 DIV 的位置都是错误的。

*

有人可以帮忙解决这个问题吗?

body {
background-color:#000;
font-size:8px;
font-family:Arial, Helvetica, sans-serif;
font-size:10px;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
text-align: center;
color:#FFF;
overflow-y:scroll;
}
#header {
background-color: #900;
position:fixed;
width:100%;
height:50px;
left: 0px;
top: 0px;
}
#apDiv1 {
visibility:hidden;
position:fixed;
width:34px;
height:114px;
left: 0px;
top: 100px;
}
#pic{
width: 108px;
right: 10px;
top: 150px;
position: fixed;
}
#facebook {
width: 34px;
left: 0px;
top: 100px;
position: fixed;
}
#Twitter {
width: 34px;
left: 0px;
top: 200px;
position: fixed;
}
#Menu {
background-color:#900;
color:#FFF;
font-size:12px;

}
#content {
width:800px;
position:absolute;
text-align:center;
left: 50%;
top:44px;
margin-left: -400px;
font-size: 10px;
font-weight: bold;
}
table tr td #Menu tr td p {
font-size: 12px;
}
table tr td table tr td strong {
font-size: 12px;
}
a:link {
color: #FFF;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #FFF;
}
a:hover {
text-decoration: none;
color: #FFF;
}
a:active {
text-decoration: none;
color: #FFF;
}

最佳答案

在您的代码中没有 DOCTYPE声明,这使 IE 在 quirks mode 中运行.在您的 html 页面的开头添加以下内容:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

关于css - IE中的网站位置错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4133304/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com