只有IE无法查看本网站

时间:2012-05-31 21:53:25

标签: html css internet-explorer

我开始建立一个网站,但似乎除了IE之外的每个浏览器都可以查看它。我很困惑为什么会发生这种情况,我对此问题的任何见解都会非常感激。

Link to website

HTML:

<html>
<head>

    <link rel="stylesheet" type="text/css" media="screen" href="css/stickyFooter.css" />

</head>
<body>

<div id="wrap">

    <header>
        <div id="header"></div>
        <div id="banner"></div>
        <div id="nameplate"></div>
        <div id="whiteLine"></div>

    </header>

    <div id="body">body</div>

    <div class="push"></div>

</div>

<footer>footer</footer>

</body>
</html>

CSS:

* {
    margin: 0;
}
html, body {
    height: 100%;
    background: url(../image/core/background.jpg) repeat-x center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
}


header div#header {
    background: url(../image/core/header.png) repeat-x;
    height: 61px;
}

header div#banner {
    background: url(../image/banner/01.jpg) no-repeat center;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    height: 300px;
}

header div#nameplate {
    background: url(../image/core/nameplate.png) no-repeat;
    height: 140px;
    width: 1000px;
    margin: -340px auto 0 auto;
}

header div#whiteLine {
    background: url(../image/core/stripe.png) repeat-x;
    height: 1px;
    margin: 200px 0 0 0;
}

#wrap {
    min-height: 100%;
    height: auto !important;
    height: 100%;
    margin: 0 auto -61px; /* the bottom margin is the negative value of the footer's height */
}
footer, .push {
    height: 61px; /* .push must be the same height as .footer */
}

footer {
    background-color: red;
}

3 个答案:

答案 0 :(得分:3)

您需要添加doctype

请参阅F12开发人员工具

中的此警告

HTML1113: Document mode restart from IE9 Standards to Quirks

查看此信息以获取更多信息 - http://www.javascriptkit.com/howto/doctype.shtml

答案 1 :(得分:1)

这很正常,网页不适用于IE。

说真的......如果您使用的是IE9之前的版本,请查看http://code.google.com/p/html5shim/

答案 2 :(得分:1)

My 2 cents.由于我为其构建页面的一些人仍然使用(呻吟)IE7,因此我必须编写代码以使“客户端”开心,首先是。所以我让我的代码在IE7上工作,然后如果它在FF等工作,它是肉汁。 <footer></footer>据我所知,旧的IE不支持.php。一条建议,如果你想要使用“页脚”标签,请使用.shtml或{{1}}格式的“包含”声明,以后更容易更改;来自经验。最坏情况的代码。干杯〜

相关问题