Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hello Friends,

I have a problem regarding to CSS. The following CSS is for my ASP menu control, this CSS is working fine In IE but not other browser like Chrome & FF.

This is My CSS.
CSS
.primaryStaticMenu
{
    border:2px solid #3cc3ff;
}
.primaryStaticMenuItem
{
    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.
Posted
Updated 12-Dec-11 19:49pm
v2
Comments
thatraja 13-Dec-11 1:59am    
Not clear, what's the issue? any error message? check it in javascript debugger
Sergey Alexandrovich Kryukov 13-Dec-11 2:03am    
Make a static HTML sample to compare. CSS along does not say much, isn't it obvious. Also, incompatibility does not have to be in just CSS.
--SA

Hey there,

you seem to have put
CSS
em

value instead of
CSS
px

I personaly recomment you change all the em to px
here is a converter: http://pxtoem.com/[^]

If your having issues in IE after changing that then pasted this in your HTML page:
HTML
<!--[if IE]>
<style type="text/css">
.primaryStaticMenu
{
    border:2px solid #3cc3ff;
}
.primaryStaticMenuItem
{
    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;
}
</style>
<![endif]-->


Tell me how it goes,
Jrop
 
Share this answer
 
Hey there,

you seem to have put
CSS
em

value instead of
CSS
px

I personaly recomment you change all the em to px
here is a converter: http://pxtoem.com/[^]

If your having issues in IE after changing that then pasted this in your HTML page:
HTML
<!--[if IE]>
<style type="text/css">
.primaryStaticMenu
{
    border:2px solid #3cc3ff;
}
.primaryStaticMenuItem
{
    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;
}
</style>
<![endif]-->


Tell me how it goes,
Jrop
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900