开发者

Browser Compatibilty for the asp Menu css not working in google chrome

This is my menu used in my application this works in all the browsers except google chrome.

In google chrome I'm not able to get the sub menus. In IE on mouse over of the menu I will get the sub menus. This is the part I have used in the master page..

Thanks in advance....

The css is given below:

.DynamicMenu
{
    border-right: solid 1px #e1ebf7;
    border-top: solid 1px #e1ebf7;
    border-left: solid 1px #e1ebf7;
    border-bottom: solid 1px #e1ebf7;
}

.DynamicMenuItem
{
    padding-right: 4px;
    padding-left: 4px;
    font-size: 11px;
    padding-bottom: 4px;
    padding-top: 4px;
    background-color: #e1ebf7;
    color: #333;
    font-size: 11px;
    font-family: tahoma;
    border-bottom: solid 1px #FFFFFF;
}

.DynamicMenuItem A:link
{
    color: #333;
    font-size: 11px;
    font-family: tahoma;
}

.DynamicMenuHover
{
    background-color: #9cb7d8;
}

.DynamicMenuItem A:hover
{
    color: White;
    background-color: #9cb7d8;
}

.DynamicMenuSelected
{
    color: white;
    font-weight: bold;
    font-size: 11px;
    font-family: tahoma;
    background: url(../../Images/heding1-bg.gif) repeat-x;
}

.DynamicMenuSelected A
{
        color: white;
    font-weight: bold;
    font-size: 11px;
    font-family: tahoma;
    background: url(../../Images/heding1-bg.gif) repeat-x;
}

.DynamicMenuSelected A:hover
{
    color: white;
    font-weight: bold;
    font-size: 11px;
    font-family: t开发者_StackOverflow中文版ahoma;
    background: url(../../Images/heding1-bg.gif) repeat-x;
}

This is Html code....

<asp:Menu ID="IDMMenu" DataSourceID="SiteMapDataSource1" runat="server" Orientation="Horizontal"
    StaticDisplayLevels="1" StaticPopOutImageUrl="~/Images/menuArrow_down.gif">
    <StaticMenuStyle CssClass="TabMenu" />
    <StaticSelectedStyle CssClass="StaticMenuSelected" />
    <StaticMenuItemStyle CssClass="StaticMenuItem" />
    <StaticHoverStyle CssClass="StaticMenuHover" />
    <DynamicSelectedStyle CssClass="DynamicMenuSelected" />
    <DynamicMenuStyle CssClass="DynamicMenu" />
    <DynamicMenuItemStyle CssClass="DynamicMenuItem" />
    <DynamicHoverStyle CssClass="DynamicMenuHover" />
  </asp:Menu>


I encountered the same issue where an ASP sub-menu was not displaying in IE10 or Chrome. I fixed my issue by adding the following code to the Page_Load method:

if (Request.UserAgent.IndexOf("AppleWebKit") > 0)
{
     Request.Browser.Adapters.Clear();
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜