Problem with asp menu (background image of MenuItem)

S

sthrudel

Hello!

I'm programmatically 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.Selectable = false;

// Fill the MenuItem with ChildItems
for (int i = 0; i < _entries.Count; i++)
{
mainItem.ChildItems.Add(_entries.CreateControl());
}

// Set some Menu properties (css classes)
menu.Items.Add(mainItem);
menu.DisappearAfter = 250;
menu.Style.Clear();
menu.StaticHoverStyle.CssClass = "StaticHoverStyle";
menu.StaticMenuItemStyle.CssClass = "StaticMenuItemStyle";
menu.StaticMenuStyle.CssClass = "StaticMenuStyle";
menu.DynamicHoverStyle.CssClass = "DynamicHoverStyle";
menu.DynamicMenuItemStyle.CssClass = "DynamicMenuItemStyle";
menu.DynamicMenuStyle.CssClass = "DynamicMenuStyle";
menu.Orientation = Orientation.Horizontal;
menu.StaticEnableDefaultPopOutImage = false;
menu.DynamicEnableDefaultPopOutImage = 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:

..StaticMenuStyle
{
}
..StaticMenuItemStyle
{
width: 110px;
height: 25px;
color: #5a5a5a;
font-family:Arial;
font-size: 11px;
background-image: url(images/ButtonBasicActive.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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top