asp:menu borders


J

jason

Does anybody know how I would get borders around each menuitem? Do I
have incorportate into a table? Thanks. The below produces a border
around the entire menu.

<form id="form1" runat="server">
<div>
<asp:Menu ID="Menu1" runat="server" BackColor="#FFC080"
BorderColor="Olive" BorderStyle="Ridge"
BorderWidth="1px" ForeColor="Navy">
<Items>
<asp:MenuItem NavigateUrl="default.aspx?s=fences"
Text="Fence Styles" Value="Fences">
</asp:MenuItem>
<asp:MenuItem NavigateUrl="default.aspx?s=gates"
Text="Gate Styles" Value="Gates"></asp:MenuItem>
</Items>
</asp:Menu>

</div>
</form>
 
Ad

Advertisements

Ad

Advertisements

T

tfsmag

You could also do it through CSS with out adjusting the controls
properties for each menu item.

set the cssclass property of the menu to a css class with some of your
menu's style attributes... ex:

..menu_class
{
background-color:#ffffff;
}

then to access the cells themselves you should be able to do that by
adding a td to the css class. ex:

..menu_class td
{
border:1px solid #000000;
}

my code might be a little off, i'm going off the top of my head, I do
remeber this working for me with out having to go in and mess with the
control properties.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top