473,398 Members | 2,343 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

asp:menu borders

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>

Jul 18 '06 #1
2 5562
Jason,

Each menu item has styles properties. Go into the properties for the menu
items themselves and set the border via style sheets there.

Here is a white paper about using styles with .net objects including the
menu object:
http://www.asp.net/CSSAdapters/WhitePaper.aspx
Regards,

--
S. Justin Gengo
Web Developer / Programmer

Free code library:
http://www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
<ja***@cyberpine.comwrote in message
news:11**********************@p79g2000cwp.googlegr oups.com...
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>

Jul 18 '06 #2
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.
S. Justin Gengo wrote:
Jason,

Each menu item has styles properties. Go into the properties for the menu
items themselves and set the border via style sheets there.

Here is a white paper about using styles with .net objects including the
menu object:
http://www.asp.net/CSSAdapters/WhitePaper.aspx
Regards,

--
S. Justin Gengo
Web Developer / Programmer

Free code library:
http://www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
<ja***@cyberpine.comwrote in message
news:11**********************@p79g2000cwp.googlegr oups.com...
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>
Jul 18 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Chuck Hartman | last post by:
I have a Windows service that requests web pages from a site using an HttpWebRequest object. When I try to request a page from an ASP.NET 2 site, I get a WebException with message "The remote...
7
by: tfsmag | last post by:
Has anyone had a problem with putting a menu control into a master page in .net 2.0? I have a problem where if i just drop a menu control on a regular page the menu works fine, the submenus work...
4
by: Ben | last post by:
Hi, I'm using images in my menu control. I have my menu setup based on this example: http://msdn2.microsoft.com/en-US/library/system.web.ui.webcontrols.menuitembinding.imageurlfield(VS.80).aspx ...
0
by: jason | last post by:
Playing around with asp.net 2.0 and asp:menu for the first time.. what's the attribute/code so that each item in my menu has a *SEPERATE* border around it? Seems I can only make the border around...
2
by: Kevin L. Kitchens | last post by:
Howdy... Been toying the the asp:menu object in order to dump the manually generated menu I've been using, however, I cannot seem to get the coloring to work properly. First off, what CSS...
2
by: Steve Richter | last post by:
I would like to have a standard site navigation menu, horizontal across the page, at the top of the page. When I hover over a top level menu item I want a drop down menu to appear with the same...
0
by: jobs | last post by:
Hi. I have a menu horizontal on the top. I figured out that if I set this property the black arrow on parent items goes away.. StaticEnableDefaultPopOutImage="False" However, the item is...
3
by: kenny bones | last post by:
Hi! I'm currently working on a menu which is based on CSS and is listed with <li> tags. The CSS code looks like this: #nav { position: absolute; top: 101px; left: 390px; list-style: none;...
3
by: win | last post by:
I've create menu in a webform. <asp:Menu ID="Menu1" runat="server" CssClass="toolbar" Orientation="Horizontal"> <Items> <asp:MenuItem Text="Master" Value="Master"> <asp:MenuItem...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.