Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Apr 19, 2012 07:04 AM by Catherine Shan - MSFT
Member
66 Points
62 Posts
Apr 17, 2012 04:34 PM|LINK
Hi I have created a menu like this.
<asp:Menu CssClass="mainMenu" Font-Size="Medium" ForeColor="Black" ID="Menu1" runat="server" Orientation="Horizontal" > <Items> <asp:MenuItem Text="Home" Value="Default" NavigateUrl="~/Default.aspx" ></asp:MenuItem> <asp:MenuItem Text="About" Value="About" NavigateUrl="~/About.aspx" ></asp:MenuItem></Items></asp:menu>
How to change the in between space of each menu item?
All-Star
33824 Points
8760 Posts
Moderator
Apr 17, 2012 04:55 PM|LINK
Apply a style using class, that will let you adjust how you want it positioned.
Apr 17, 2012 04:57 PM|LINK
Scrap that, you have to use SeparatorImageUrl and use a spacer image. Like this:
<asp:Menu CssClass="mainMenu" Font-Size="Medium" ForeColor="Black" ID="Menu1" runat="server" Orientation="Horizontal" > <Items> <asp:MenuItem Text="Home" Value="Default" NavigateUrl="~/Default.aspx" SeparatorImageUrl="../Images/spacer.GIF"></asp:MenuItem> <asp:MenuItem Text="About" Value="About" NavigateUrl="~/About.aspx" SeparatorImageUrl="../Images/spacer.GIF"></asp:MenuItem> </Items> </asp:menu>
23382 Points
2490 Posts
Microsoft
Apr 19, 2012 07:04 AM|LINK
Hi Rockmarley,
If you want to customize the menuitem space, you can try to use MenuItemStyle.ItemSpacing Property to change the space between the each menuitem.
In addition, you can see the similar thread below:
http://forums.asp.net/t/1531646.aspx/1
Best wishes,
Rockmarley
Member
66 Points
62 Posts
Customize Menu Item Space in ASP.NET Menu
Apr 17, 2012 04:34 PM|LINK
Hi I have created a menu like this.
<asp:Menu CssClass="mainMenu" Font-Size="Medium" ForeColor="Black" ID="Menu1" runat="server" Orientation="Horizontal" >
<Items>
<asp:MenuItem Text="Home" Value="Default" NavigateUrl="~/Default.aspx" ></asp:MenuItem>
<asp:MenuItem Text="About" Value="About" NavigateUrl="~/About.aspx" ></asp:MenuItem></Items></asp:menu>
How to change the in between space of each menu item?
www.malindesilva.com
Microsoft Student Ambassador, Sri Lanka
Editor, INTECS
Information Technology Society
University of Moratuwa, Sri Lanka
bbcompent1
All-Star
33824 Points
8760 Posts
Moderator
Re: Customize Menu Item Space in ASP.NET Menu
Apr 17, 2012 04:55 PM|LINK
Apply a style using class, that will let you adjust how you want it positioned.
bbcompent1
All-Star
33824 Points
8760 Posts
Moderator
Re: Customize Menu Item Space in ASP.NET Menu
Apr 17, 2012 04:57 PM|LINK
Scrap that, you have to use SeparatorImageUrl and use a spacer image. Like this:
<asp:Menu CssClass="mainMenu" Font-Size="Medium" ForeColor="Black" ID="Menu1" runat="server" Orientation="Horizontal" > <Items> <asp:MenuItem Text="Home" Value="Default" NavigateUrl="~/Default.aspx" SeparatorImageUrl="../Images/spacer.GIF"></asp:MenuItem> <asp:MenuItem Text="About" Value="About" NavigateUrl="~/About.aspx" SeparatorImageUrl="../Images/spacer.GIF"></asp:MenuItem> </Items> </asp:menu>Catherine Sh...
All-Star
23382 Points
2490 Posts
Microsoft
Re: Customize Menu Item Space in ASP.NET Menu
Apr 19, 2012 07:04 AM|LINK
Hi Rockmarley,
If you want to customize the menuitem space, you can try to use MenuItemStyle.ItemSpacing Property to change the space between the each menuitem.
In addition, you can see the similar thread below:
http://forums.asp.net/t/1531646.aspx/1
Best wishes,
Feedback to us
Develop and promote your apps in Windows Store