Click here to Skip to main content
15,900,973 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, Iam using vs2010. Is it possible to increase the gape height between Menu Items and its Child Menu Item.... Is it possible?

From the below code, I wish to increase the gape height between "About Us" and "Company"

Thanks for the guidances...

My Codings...
XML
<asp:Menu ID="AboutMenu" runat="server" BorderStyle="None"Style="text-align:left;" Font-Names="Footlight MT Light" Font-Size="16px" Orientation="Horizontal" StaticEnableDefaultPopOutImage="False"Font-Bold="True" ForeColor="Black">
<Items>
<asp:MenuItem Text="About Us" Value="About Us" NavigateUrl="~/About_Us.aspx">
<asp:MenuItem Text="Company" Value="Company" </asp:MenuItem>
<asp:MenuItem Text="Management" Value="Management" </asp:MenuItem>
<asp:MenuItem Text="Mission &amp; Values" Value="Mission &amp; Values" NavigateUrl="~/Mission_Values.aspx"></asp:MenuItem>
</asp:MenuItem>
</Items>
</asp:Menu>
Posted

1 solution

Add a CSS class to the Menu

XML
<asp:Menu ID="AboutMenu" runat="server" BorderStyle="None"Style="text-align:left;" Font-Names="Footlight MT Light" Font-Size="16px" Orientation="Horizontal" StaticEnableDefaultPopOutImage="False"Font-Bold="True" ForeColor="Black" class="menuItems">
<Items>
<asp:MenuItem Text="About Us" Value="About Us" NavigateUrl="~/About_Us.aspx">
<asp:MenuItem Text="Company" Value="Company" </asp:MenuItem>
<asp:MenuItem Text="Management" Value="Management" </asp:MenuItem>
<asp:MenuItem Text="Mission &amp; Values" Value="Mission &amp; Values" NavigateUrl="~/Mission_Values.aspx"></asp:MenuItem>
</asp:MenuItem>
</Items>
</asp:Menu>

and use:
.menuItems
{
line-height:25px;
}


or whatever height you want. I suppose padding and margin would work as well.
 
Share this answer
 

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