Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/google-chrome/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Internet explorer 主页在chrome&ie上显示不正确;在safari和firefox上很好_Internet Explorer_Google Chrome_Html_Cross Browser - Fatal编程技术网

Internet explorer 主页在chrome&ie上显示不正确;在safari和firefox上很好

Internet explorer 主页在chrome&ie上显示不正确;在safari和firefox上很好,internet-explorer,google-chrome,html,cross-browser,Internet Explorer,Google Chrome,Html,Cross Browser,我的站点的登录页,只在IE和Chrome上显示页面的下半部分。Safari&FF似乎可以很好地加载它。任何建议都将不胜感激 代码如下: <!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"> <head> <

我的站点的登录页,只在IE和Chrome上显示页面的下半部分。Safari&FF似乎可以很好地加载它。任何建议都将不胜感激

代码如下:

<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Warren Howden - Music</title>
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<link href="warrenhowden.css" rel="stylesheet" type="text/css" />
</head>

<body id="page-home" style="width:99%; background-color:black; font-family:'Trebuchet MS', Arial, Helvetica, sans-serif; font-size:1.7em; font-weight:bold; text-shadow: -1px 0 0.2em blue, 0 1px 0.2em blue, 1px 0 0.2em blue, 0 -1px 0.2em red; border:0; margin-bottom:0; padding:0;">
<div style="position:absolute;">
<img src="images/landingpage.jpg" alt="Welcome to Warren Howden's Music" style="max-width:100%; min-width:100%; z-index:-1; border:0;margin-left:auto; margin-right:auto;"/>
<a style="position:absolute; top:12%; left:18%;" href="read.php" title="life &amp; influences">READ</a>
<a style="position:absolute; top:12%; left:47%;" href="look.php" title="pictures">LOOK</a>
<a style="position:absolute; top:12%; left:74%;" href="listen.php" title="tunes">LISTEN</a>
<a style="position:absolute; top:47%; left:17%;" href="watch.php" title="video clips">WATCH</a>
<a style="position:absolute; left:40%; width:20%;" id="centretext" href="#"><span style="font-family:'Alice', serif;">WARREN&nbsp;HOWDEN<br />
</span><span style="font-family:'FrancoisOne', sans-serif; font-size:1.3em; letter-spacing:4px; text-decoration:overline; padding-left:3px;">FLUTEBOXING</span></a>
<a style="position:absolute; top:47%; left:76%;" href="see.php" title="catch Warren live">SEE</a>
<a style="position:absolute; top:84%; left:14%;" href="soundtracks.php" title="other projects">SOUNDTRACKS</a>
<a style="position:absolute; top:84%; left:47%;" href="links.php" title="cool stuff">LINKS</a>
<a style="position:absolute; top:84%; left:73%;" href="contact.php" title="email, newsletter">CONTACT</a>
</div> 
</body>
</html>
添加此css规则

body{
margin:0
}
所有浏览器都有默认边距和填充,当您想要使用css时,您应该编写或使用css重置-示例:

*{
padding:0;
margin:0;
border:none;
}

或者你可以下载现有的css重置文件。

我看到在bodypage主页的css中有一个属性margin bottom:0;。您需要将其更改为margin:auto;。仅此而已,它在Chrome上运行良好

这可能是绝对定位。你能不能把这三行分成三列来保持每件事的整洁?你的代码中有很多问题,1.尝试删除所有的内联样式并在css中定义。2.不要使用behavior:urlcsshover.htc,因为这会影响性能,尤其是当页面中有这么多href属性时。3.主页{margin top:-25%}这就是您的问题所在,请将@media查询顺序从最小屏幕大小重新排列为最大屏幕大小,并从默认的一个开始。关闭主题:为什么要使用xhtml严格doctype?有没有理由不能使用html5 doctype?您确实需要严格的xhtml规则吗?今天没有人认真推荐xhtml。