Hello!
I'm programmaticall y inserting a navigation asp menu to a page, like
this:
// Create new Menu
Menu menu = new Menu();
// Create new MenuItem
MenuItem mainItem = new MenuItem();
mainItem.Text = _text;
mainItem.Select able = false;
// Fill the MenuItem with ChildItems
for (int i = 0; i < _entries.Count; i++)
{
mainItem.ChildI tems.Add(_entri es[i].CreateControl( ));
}
// Set some Menu properties (css classes)
menu.Items.Add( mainItem);
menu.DisappearA fter = 250;
menu.Style.Clea r();
menu.StaticHove rStyle.CssClass = "StaticHoverSty le";
menu.StaticMenu ItemStyle.CssCl ass = "StaticMenuItem Style";
menu.StaticMenu Style.CssClass = "StaticMenuStyl e";
menu.DynamicHov erStyle.CssClas s = "DynamicHoverSt yle";
menu.DynamicMen uItemStyle.CssC lass = "DynamicMenuIte mStyle";
menu.DynamicMen uStyle.CssClass = "DynamicMenuSty le";
menu.Orientatio n = Orientation.Hor izontal;
menu.StaticEnab leDefaultPopOut Image = false;
menu.DynamicEna bleDefaultPopOu tImage = false;
return menu;
Basically each menu that gets returned (in above function) is a menu
with one menu item which look like this:
http://www.kizej.com/~primozh/x/image.bmp
If you look closely, you see that the background of the text is
basically the background of the MenuItem. WHY is this happening?
Here is the CSS:
..StaticMenuSty le
{
}
..StaticMenuIte mStyle
{
width: 110px;
height: 25px;
color: #5a5a5a;
font-family:Arial;
font-size: 11px;
background-image: url(images/ButtonBasicActi ve.jpg);
}
Background image looks like this:
http://www.kizej.com/~primozh/x/ButtonBasicActive.jpg
Can anyone tell me why is the background image of the text the same as
the background image of the MenuItem?