StaticMenuItemStyle Border Thickness

I would like a 1px border around my menus to make them stand out, but the borders multiply between menu items.

For example, if it's a 1px border, it's fine on top/sides/bottom, but in between the top menu item and the one below it, that border doubles to 2px.

Anyone know if there's an attribute I'm not setting?

Here's the code for my menu control.

<asp:Menu ID="Menu1" runat="server" BackColor="#fcfdf5" DynamicHorizontalOffset="2" Font-Names="Arial, Helvetica" Font-Size="11px" ForeColor="#666666" StaticSubMenuIndent="12px" Width="195px">
    <StaticMenuItemStyle BackColor="#F3F7DE" HorizontalPadding="5px" VerticalPadding="2px" BorderColor="#D3D9B5" BorderWidth="1" />
    <DynamicHoverStyle BackColor="#F3F7DE" ForeColor="Black" />
    <DynamicMenuStyle BackColor="#fcfdf5" />
    <StaticSelectedStyle BackColor="#F3F7DE" />
    <DynamicSelectedStyle BackColor="#F3F7DE" />
    <DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="3px" />
    <Items>
        <asp:MenuItem ImageUrl="~/Graphics/nav_off.gif" Text="Reconcilement" Value="Reconcilement" NavigateUrl="~/PageControls/Reconcilement.aspx"></asp:MenuItem>
        <asp:MenuItem ImageUrl="~/Graphics/nav_off.gif" Text="Exception Management" Value="Exception Management" NavigateUrl="~/PageControls/ExceptionManagement.aspx"></asp:MenuItem>
        <asp:MenuItem ImageUrl="~/Graphics/nav_off.gif" Text="Disputes" Value="Disputes" NavigateUrl="~/PageControls/Disputes.aspx">
            <asp:MenuItem ImageUrl="~/Graphics/nav_off.gif" Text="ATM" Value="ATM" NavigateUrl="~/PageControls/ATM.aspx"></asp:MenuItem>
        </asp:MenuItem>
    </Items>
    <StaticHoverStyle  Font-Underline="true" BackColor="#F3F7DE" ForeColor="Black" />
</asp:Menu>
LVL 4
tekchicAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

craskinCommented:
it's because you're setting the borderstyle on the menu items rather than the menu collection.
tekchicAuthor Commented:
If I put it up on the <asp:Menu> tag, it puts a border around all the items, but not the item individually.  I'd like a border around each clickable menu, but not doubled size-wise in between items.  Is this possible?

Thanks for the quick response.  I'm really new to ASP.NET 2.0 nav controls.
craskinCommented:
does the menu control have a gridlines attribute? if so, you could just set GridLines="Horizontal".
Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

tekchicAuthor Commented:
None.  There is a CssClass attribute.  I might have to figure out how to use that and apply a stylesheet.  Seems like overkill.
craskinCommented:
better idea, use the border setting on the menu tag, then assign a CssClass to the items. call it menuitemstyle or something like that. then in your stylesheet:

.menuitemstyle{
      border-top: 1 Black;
}

this will put a line at the top of each menu item cell. you can also put all your font settings in there. definitely not overkill.
tekchicAuthor Commented:
Apparently there's an attribute I overlooked: "SeparatorImageUrl" for each individual menu item.  I created a "line" and called that "bottomSep.gif", and that works for getting the lines in between each item.  It's *almost* what I'm looking for, but for now it'll do.

<asp:MenuItem SeparatorImageUrl="~/Graphics/bottomSep.gif" ImageUrl="~/Graphics/nav_off.gif" Text="Reconcilement" Value="Reconcilement" NavigateUrl="~/PageControls/Reconcilement.aspx"></asp:MenuItem>

Thanks for the help, craskin.  I tried making the border-top css class, but it didn't appear to pick it up in the browser.  It could be that the ASP.NET menu is overlaying the entire top level, maybe a z-index might fix it.

I guess for now I'll work with the "SeparatorImageUrl" on the <asp:MenuItem> element, and on the <asp:Menu> element I can use "StaticTopSeparatorImageUrl" to get the line going along the top of the menu.
GranModCommented:
PAQed with points refunded (250)

GranMod
Community Support Moderator

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Fonts Typography

From novice to tech pro — start learning today.