Why not work in css asp: menu?
I can not change either the font color or background in asp: menu.
How do I fix? Where to change the properties of a menu?
How do I fix?
Переписал модуль CategoryNavigation.
Не могу заставить работать css в asp:menu?
Не получается изменить ни цвет шрифта ни фон.
Как исправить? Где менять свойства у menu?
CategoryNavigation.ascx (for example)
<%@ Control Language="C#" AutoEventWireup="true" Inherits="NopSolutions.NopCommerce.Web.Modules.CategoryNavigation"
CodeBehind="CategoryNavigation.ascx.cs" %>
<style type="text/css">
#navigationMenu2
{
}
#navigationMenu2 .NMItem
{
background-color: Blue;
width: 151px;
height: 28px;
}
#navigationMenu2 .NMItemSelected, #menu .NMItemHover
{
background-color: Green;
}
#navigationMenu2 a, #navigationMenu2 a:visited
{
background: transparent !important;
background-color: Aqua;
display: block;
}
#navigationMenu2 a:hover, #navigationMenu2 a:active, #navigationMenu2 a:focus
{
background: transparent !important;
display: block;
}
</style>
<div id="navigationMenu2">
<asp:Menu ID="NavigationMenu2" runat="server" Orientation="Horizontal">
<DynamicMenuItemStyle CssClass="NMItem" />
<DynamicSelectedStyle CssClass="NMItemSelected" />
<DynamicHoverStyle CssClass="NMItemHover" />
<Items>
<asp:MenuItem Value="1111" Text="aaaa">
<asp:MenuItem Value="2222" Text="bbbb"></asp:MenuItem>
<asp:MenuItem Value="3333" Text="cccc"></asp:MenuItem>
<asp:MenuItem Value="4444" Text="dddd"></asp:MenuItem>
</asp:MenuItem>
</Items>
</asp:Menu>
</div>
Please help me.
Thanks!