I'm having trouble spacing a menu control in an ASP.NET page. Is my solution the correct way to do t

Posted by pkiyan on Stack Overflow See other posts from Stack Overflow or by pkiyan
Published on 2010-05-27T02:39:20Z Indexed on 2010/05/27 2:41 UTC
Read the original article Hit count: 299

Filed under:

Hey, I added a menu control to my page that is displayed vertically. I couldn't find a way to add spaces (I'd like about 5px.) between the menu items, so I just did something similar to this:

<asp:Menu ID="Menu1" runat="server" BackColor="ActiveBorder">
    <Items>
        <asp:MenuItem NavigateUrl="~/About.aspx" Text="One" />
    </Items>
</asp:Menu>

<p></p>

<asp:Menu ID="Menu2" runat="server" BackColor="ActiveBorder">
    <Items>
        <asp:MenuItem NavigateUrl="~/Default.aspx" Text="Two" />
    </Items>
</asp:Menu>

I just created multiple menu controls with a single menu item control in them, and placed a break between the menu controls. This seems very wrong to me, but I could not figure out another way. Also, this is a bit off subject, but is it okay to use empty paragraph tags as line breaks?(sometimes a br tag is too much) Thanks..

© Stack Overflow or respective owner

Related posts about ASP.NET