Hi,
the CSS class you specify for MenuItemStyle and HoverStyle is applied to both a TD, and the link inside the TD, resulting in the graphic being displayed twice.
Here's my solution.
Write a DIV tag around your menu, let's give it the ID "menu":
<div id="menu">
<asp:Menu ID="Menu" runat="server" EnableTheming="True" StaticEnableDefaultPopOutImage="False" DataSourceID="SiteMapDataSource1" SkipLinkText="">
<StaticMenuItemStyle CssClass="Item" />
<StaticSelectedStyle CssClass="ItemSelected" />
<StaticHoverStyle CssClass="ItemHover" />
</asp:Menu>
</div>
Now, in your CSS, define as follows:
#menu{ /* nothing in here right now */
}
#menu .Item
{
/* CSS class for non-selected Menu Item */
background: url(your image here) no-repeat;
}
#menu .ItemSelected, #menu .ItemHover
{
/* CSS class for hovering and selected Menu Item
... which can be split up, of course! */
background: url(your image here) no-repeat;
}
/* CSS classes for standard Links, only valid inside the #menu DIV */
#menu a, #menu a:visited
{
background: transparent ! important;
display: block;
}
#menu a:hover, #menu a:active, #menu a:focus
{
background: transparent ! important;
display: block;
}
The trick is: you set the background image in the .Item, .ItemSelected and .Item classes. And then you override those exact pictures in the a classes, using the !important marker. Works great for me!
Bye
Alexander