I\'m using the asp:Menu control on an ASP.NET 4.0 Webforms page with table-free rendering mode:
I also picked up this problem whenever I had a lot going on in the page between the CSS file and the onload event which presumably triggers the javascript to decorate the menu items. Particularly in IE8 this delay for javascript to fix the styling was ugly.
The solutions from peter and Clearcloud8 were almost good for me. I use this:
div.menu > ul > li
{
display: inline-block;
list-style: none;
}
div.menu ul li ul
{
display: none;
}
The main difference being that I used "div.menu > ul > li" which targets only the topmost row of items, instead of "div.menu ul li" which afects the sub-menus also - the result being that the submenu items were not the same width, so they dropped down in a jagged list.
(I am using Visual Studio 2010, .Net Framework 4)