css没有在IE8上应用,在Chrome和Firefox中运行良好

时间:2014-09-13 06:23:34

标签: javascript css struts2 internet-explorer-8 liferay-6

概述:尝试将Web应用程序移植到struts2 liferay portlet。

问题定义:css没有在IE8中加载。

说明

我正在尝试通过我的jsp应用stylesheet.css,使用下面的代码片段

<link type="text/css" rel="stylesheet"
    href="<%=request.getContextPath()%>/css/stylesheet.css" media="all" /> 

以下是为IE8编写的stylesheet.css的代码片段。

#block-system-user-menu ul.lisb li.logout {
    top: -1px;
    right: 0;
    background:url(../images/bg_navTabs.png) repeat-x;
    border-bottom-right-radius: 6px;
    border-left: solid 1px #345676;
}
#block-system-user-menu ul.lisb li.logout a {
    display: table;
    margin: 0;
    padding: 0 10px;
    line-height: 30px;
    color:#fff;
    text-decoration:none;
}
#block-system-user-menu ul.lisb li.logout a img {
    border:none;
    vertical-align:middle
}
#block-system-user-menu ul.lisb {
    position: absolute;
    top: -1px;
    right: 0;
    display: table;
    list-style: none outside none;
    margin: 0;
    padding: 0;
    background:url(../images/bg_topTabs.png) repeat-x scroll 0 0 transparent;
    border-top: medium none;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}
#block-system-user-menu ul.lisb li {
    list-style: none;
    letter-spacing: 0;
    display: table-cell;
    padding: 0;
}
#block-system-user-menu ul.lisb li a, #block-system-user-menu ul.lisb li .megapath-phone-support , #block-system-user-menu ul.lisb li span {
    font-size: 12px;
    display: inline-block;
    padding: 0 10px;
    line-height: 30px;
    color: #0F345E;
    text-decoration:none;
} 
#block-system-user-menu ul.lisb li a img, #block-system-user-menu ul.lisb li .megapath-phone-support img, #block-system-user-menu ul.lisb li span img {
    border:none;
    vertical-align:middle;
}
#block-system-user-menu ul.lisb li a.support {
    padding-left: 26px;
} 
#block-system-user-menu ul.lisb li span {
    color: #333;
    background-image: none;
    background-color: #e9e9e9;
    -ms-filter: "progid:DXImageTransform.Microsoft.gradient(enabled=false)";/* IE8 */
}
#block-system-user-menu ul.lisb li a:hover {
    display: inline-block;
    padding: 0 10px;
    line-height: 30px;
    background-image: none;
    -ms-filter: "progid:DXImageTransform.Microsoft.gradient(enabled=false)";/* IE8 */
    color: #1C9AD6;
    text-decoration: none;
}
#block-system-user-menu ul.lisb li a.support:hover {
    padding-left: 26px;
    background-image: url('./images/icon_supportQ.png'), -webkit-linear-gradient(bottom, #b8e4f1 0%, #b8e4f1 100%);
    -ms-filter: "progid:DXImageTransform.Microsoft.gradient(enabled=false)";/* IE8 */
}


#block-system-user-menu ul.lisb li.first a, #block-system-user-menu ul.lisb li.first .megapath-phone-support, #block-system-user-menu ul.lisb li.first span {
    border-bottom-left-radius: 6px;
    border-left: medium none;
    color: #0F345E;
    border-right: solid 1px #4589b7;
}
#block-system-user-menu ul.lisb li.first a:hover { 
    color:#fff;
}
#block-system-user-menu ul.lisb li.last a {
    border-bottom-right-radius: 6px;
    border-left: solid 1px #345676;
}

样式表在Firefox / Chrome中加载,但未在IE8中加载

请帮忙!

0 个答案:

没有答案