Click here to Skip to main content
15,896,513 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear All,

I am learning to build ASP.net application and I am using a Horizontal Menu in my web page.
I have designed the look but now i want to decrease the spacing between the menu items...
Can anyone help me in this.

Thanks in advance.

This is my code : -

XML
<asp:Menu runat = "server" CssClass = "menuItem" Orientation = "Horizontal" ID = "Menu1" MaximumDynamicDisplayLevels="5" BackColor="#B5C7DE" Font-Names="Cambria" Font-Size="1em" ForeColor="#284E98" StaticSubMenuIndent="0px" Width="100%" StaticEnableDefaultPopOutImage="false" StaticItemFormatString="{0}" Height="6px" ItemWrap="True">
    <Items>
        <asp:MenuItem Text = "File" Value="File">
            <asp:MenuItem Text=" " Value="Overview" />
            <asp:MenuItem Text="Edit" Value="Edit" />
            <asp:MenuItem Text="Create" Value="Create" />
            <asp:MenuItem Text="Delete" Value="Delete" />
        </asp:MenuItem>

        <asp:MenuItem Text = "Forms" Value="Forms">
            <asp:MenuItem Text="Overview" Value="Overview" />
            <asp:MenuItem Text="Edit" Value="Edit" />
            <asp:MenuItem Text="Create" Value="Create" />
            <asp:MenuItem Text="Delete" Value="Delete" />
        </asp:MenuItem>

        <asp:MenuItem Text = "Reports" Value="Reports">
            <asp:MenuItem Text="Overview" Value="Overview" />
            <asp:MenuItem Text="Edit" Value="Edit" />
            <asp:MenuItem Text="Create" Value="Create" />
            <asp:MenuItem Text="Delete" Value="Delete" />
        </asp:MenuItem>

     </Items>
     <StaticMenuItemStyle BorderColor="Black" BorderStyle="Solid" BorderWidth="2px" HorizontalPadding="10px" />
</asp:Menu>
Posted
Updated 15-Mar-13 21:54pm
v2
Comments
Sandeep Mewara 16-Mar-13 3:48am    
And? How do you expect us to tell anything without you showing us what and how you did and is working.
Shubham Choudhary 16-Mar-13 4:10am    
so make horizontalpadding less!!!
Vreeti 16-Mar-13 4:14am    
No... Its not working.... :-(
Shubham Choudhary 16-Mar-13 4:27am    
ok let me check

1 solution

Hi!!!
make Width="40%" or which you want!!!!
 
Share this answer
 
Comments
Vreeti 16-Mar-13 4:57am    
Thank u Shubham.. Its done :-)
Shubham Choudhary 16-Mar-13 4:59am    
welcome:)

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