CSS无法在IE-8和Firefox上工作 [英] Css not working on IE-8 and firefox

查看:73
本文介绍了CSS无法在IE-8和Firefox上工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友,
我的CSS在IE6和IE7上工作正常,但在IE8和Firefox上却出现了问题.这是我的菜单css plz,告诉我其中的问题是什么.

hello friends,
my css work fine on IE6 and IE7 but it gives problem on IE8 and firefox. here is my menu css plz tell me whats the problem inside it.

.primaryStaticMenu
{
    border:2px solid #3cc3ff;
}
.primaryStaticMenuItem
{
    /*width: 13em;
    background-color: #0089c8;
    border-width: 1px;
    border-color: #efefef #aaab9c #ccc #efefef;
    border-style: solid;
    color: #3cc3ff;
    padding: 0.5em 0 0.5em 1em;*/
    width:8em;
    font-size:14px;
    font-weight:bold;
    color:#3cc3ff;
    text-decoration:none;
    margin-left:5px;
    padding-left:10px;
    border-right-width:2px;
    border-right-style:solid;
    border-right-color:#3cc3ff;
    text-align:center;
    line-height:30px;
    padding-right:10px;
}
.primaryStaticHover
{
    /*color: #3cc3ff;
    background: #FFFFFF;*/
    font-size:14px;
    font-weight:bold;
    color:#FFFFFF;
    text-decoration:none;
    margin-left:5px;
    padding-left:10px;
    border-right-width:2px;
    border-right-style:solid;
    border-right-color:#3cc3ff;
    text-align:center;
    line-height:30px;
    padding-right:10px;
}

.primaryDynamicMenu
{
    border-bottom:solid 1px #3cc3ff;
    border-color:#3cc3ff;
    width:10em;
}
.primaryDynamicMenuItem
{
    width: 10em;
    color: #3cc3ff;
    padding: 0.5em .1em 0.5em .5em;
    border-width: 1px; /*border-color: #f7f2ea #aaab9c #f7f2ea #efefef;*/
    border-color: #3cc3ff #3cc3ff #3cc3ff #3cc3ff;
    border-style: solid;
    background-color: #0089c8;
    text-align: left;
}
.primaryDynamicHover
{
    color:#FFFFFF;
}
 .secondaryLevelOne
{
   background-color:transparent;
   background-repeat:repeat-x;
   margin:1.5em 0 0 0;
   padding:5px 0 0 5px;
   width:12em;
   height:35px;
}
.secondaryLevelTwo
{
   background:#FAFBFB;
   padding:5px 0 5px 5px;
}
.secondaryStaticHover
{
   color:#800000;
}
.StaticSelectedStyle
{
    color: #FFFFFF;
    text-decoration: none;
}
.DynamicSelectedStyle
{
    color:#FFFFFF;
    text-decoration:none;
}




在此先感谢....




thanks in advance....

推荐答案

是不是您没有正确设置悬停,以便菜单项不会像您期望的那样更改颜色?至:

您需要执行以下操作:

.primaryStaticMenuItem:hover


而不是:

.primaryDynamicHover


那是我的猜测:正如John所说,css看不到其他任何错误,没有上下文就什么也没有.

另一方面,如果它适用于6& 7,但不是8/9或FireFlox,则可能取决于html设计/布局.基本上,我在风中小便,因为我介于咖啡之间,这很有趣.
Is it that you haven''t properly set hover so that the menu items don''t change color as you expect them to:

You need to do something like:

.primaryStaticMenuItem:hover


rather than:

.primaryDynamicHover


That''s my guess: can''t see anything else wrong with the css though, as John has said, without context there is nothing.

On the other hand, if it works on 6 & 7 but not 8/9 or FireFlox then it might be down to the html design/layout. Basically I''m pissing in the wind because I''m between coffees and it''s fun.


这篇关于CSS无法在IE-8和Firefox上工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆