0

我有以下CSS:

#main2 {
    width: 680px;
    margin: 0 auto;
    padding: 0;
}
#header2 {
    text-align: center;
    margin: 0 auto;
    padding: 0;
    height: 31px;
    line-height: 31px;
}
#contents2 {
    text-align: center;
    margin: 0 auto;
    border: 3px solid #0F446D;
    padding: 0;
    padding-left: 15px;
    height: 365px;
    background: url('theImages/certBG.png') no-repeat bottom;
}
#store {
    background-image: url('theImages/certHeader.png');
    width: 231px;
    height: 31px;
    padding: 0;
    margin: 0 auto;
    color: #FFFFFF;
    font-weight: bold;
    font-family: Verdana, Arial;
    font-size: 14px;
}

但是这个页面:非工作页面 不工作

显示标题“您的信息”的方式与此页面不同:工作页面 在职的

谁能告诉我为什么?以及如何使首页正确显示页眉。

4

2 回答 2

2

对于 Internet Explorer(IE ),您需要不同的 CSS 样式表

参考以下页面源代码的第 8,9 和 10 行(通过单击IE 中的ViewSource)。

<!--[if IE]>
<link href="theScriptsStyles/mainStyle-ie.css" rel="stylesheet" type="text/css" />
<![endif]-->

Page Link-1包含IE Style-Sheet,而 Page Link-2不包含。

两个页面在其他浏览器(Chrome、Firefox)中看起来相同。在 Internet Explorer 中看起来不同,因为mainStyle-ie.css

IE 总是有 CSS 问题。因此,您必须专门针对 IE 的样式表。您需要将条件代码(如上)放在页面的标题部分。

于 2013-03-27T17:30:54.123 回答
1

#store22{ display:block;}

或者

添加显示:块;在第 22 行

它可以满足您的要求。:)

于 2013-03-27T19:00:53.820 回答