473,385 Members | 1,333 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,385 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 5561
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.