Click here to Skip to main content
14,882,311 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
When i click the navigation menu in my project.

That menu is horizondal. i was click the menu suddenly that menu showing 1 second in vertical alignment after showing horizondal. Any problem in code please help me.
Posted
Comments
Dholakiya Ankit 19-Sep-13 6:45am
   
orientation="Horizontal" to verticle may help you

XML
Update below code in existing code.!

StaticHoverStyle-Width=932px;

and add below code in li portion of class NavigationMenu

display:inline-block;

in case above line will not work then replace that with below line.

display:inline;
   
Comments
Member 10222278 19-Sep-13 7:05am
   
Where it will use li portion...
This is my code
<asp:menu id="NavigationMenu" CssClass="NavigationMenu" Width="932px"
staticdisplaylevels="2" DynamicHorizontalOffset="2"
staticsubmenuindent="2px" MaximumDynamicDisplayLevels="4"
orientation="Horizontal"
StaticHoverStyle-Width="932px"
DynamicPopOutImageUrl="~/Image/Blue.jpg"
datasourceid="SiteMapDataSource1"
runat="server"
Font-Names="Verdana" Font-Size="Small" ForeColor="#663300" BorderStyle="None" Font-Bold="True">

<staticmenuitemstyle cssclass="staticMenuItemStyle" font-size="Small" height="20px" horizontalpadding="165.5px" verticalpadding="2px" width="106.98px">
<statichoverstyle cssclass="staticHoverStyle" backcolor="#69A6D2" font-size="Small" height="20px" width="106.98px">
<staticmenustyle backcolor="#FFCC66" bordercolor="#99CCFF" borderstyle="Groove" horizontalpadding="0px" verticalpadding="0px">
<staticselectedstyle cssclass="staticMenuItemSelectedStyle">

<dynamicmenuitemstyle cssclass="dynamicMenuItemStyle">
<dynamichoverstyle cssclass="menuItemMouseOver" backcolor="#99CCFF">
<dynamicmenustyle cssclass="menuItem" backcolor="#FFCC66" verticalpadding="3px">
<dynamicselectedstyle cssclass="menuItemSelected">
<databindings>
<asp:MenuItemBinding DataMember="siteMapNode"
NavigateUrlField="url" TextField="title"
ToolTipField="description" />

Member 10222278 19-Sep-13 7:25am
   
where it will use li portion
[no name] 19-Sep-13 7:27am
   
in you Stylesheet(CSS) CssClass is "NavigationMenu"
Member 10222278 19-Sep-13 7:48am
   
Is not working

Edited:Rohan Leuva
[no name] 19-Sep-13 7:52am
   
Ok No Problem.! now create one class with name of .siteMapNode and add the code of display in this class like this.

.siteMapNode
{
width:auto;
display:inline;
/* or */
display : inline-block;
}
Thanks7872 19-Sep-13 7:53am
   
Don't use this type of words here on cp
can you specify the code of css here??
   
Comments
Member 10222278 19-Sep-13 6:44am
   
<asp:menu id="NavigationMenu" CssClass="NavigationMenu" Width="932px"
staticdisplaylevels="2" DynamicHorizontalOffset="2"
staticsubmenuindent="2px" MaximumDynamicDisplayLevels="4"
orientation="Horizontal"
StaticHoverStyle-Width="1000px"
DynamicPopOutImageUrl="~/Image/Blue.jpg"
datasourceid="SiteMapDataSource1"
runat="server"
Font-Names="Verdana" Font-Size="Small" ForeColor="#663300" BorderStyle="None" Font-Bold="True">

<staticmenuitemstyle cssclass="staticMenuItemStyle" font-size="Small" height="20px" horizontalpadding="165.5px" verticalpadding="2px" width="106.98px">
<statichoverstyle cssclass="staticHoverStyle" backcolor="#69A6D2" font-size="Small" height="20px" width="106.98px">
<staticmenustyle backcolor="#FFCC66" bordercolor="#99CCFF" borderstyle="Groove" horizontalpadding="0px" verticalpadding="0px">
<staticselectedstyle cssclass="staticMenuItemSelectedStyle">

<dynamicmenuitemstyle cssclass="dynamicMenuItemStyle">
<dynamichoverstyle cssclass="menuItemMouseOver" backcolor="#99CCFF">
<dynamicmenustyle cssclass="menuItem" backcolor="#FFCC66" verticalpadding="3px">
<dynamicselectedstyle cssclass="menuItemSelected">
<databindings>
<asp:MenuItemBinding DataMember="siteMapNode"
NavigateUrlField="url" TextField="title"
ToolTipField="description" />

Member 10222278 19-Sep-13 6:51am
   
This is my navigation menu code..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900