473,597 Members | 2,157 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

using asp:menu to create drop down menu

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 background color and text alignment as the top
level item.

Am I asking too much of the asp:menu control? I went the "-CssClass"
route in order to get my menu option text to center, but this does not
seem to play well with the styling properties of the menu item
controls.

thanks,

-----------------------------------------------------------------------------------------

<asp:Menu ID="Menu1" runat="server" Orientation=Hor izontal
StaticMenuItemS tyle-CssClass="menui tem"
StaticHoverStyl e-CssClass="menui tem_hover"
OnMenuItemClick ="Menu1_MenuIte mClick">

<levelsubmenust yles>
<asp:submenusty le CssClass="menui temz" />
</levelsubmenusty les>

<Items>
<asp:MenuItem Text="File" Value="File"/>
<asp:MenuItem Text="Edit" Value="Edit"/>
<asp:MenuItem Text="Admin" Value="Admin">
<asp:MenuItem Text="Upload source code" Value="UploadCo de" />
</asp:MenuItem>
</Items>
</asp:Menu>

..menuitem
{
font: bold 1.5em Verdana, Arial, sans-serif;
padding-left:1em;
padding-right:1em;
background-color:Orange;
text-align:center;
}

..menuitem_hove r
{
background-color:Yellow;
}

Jun 5 '07 #1
2 5670
"Steve Richter" <St************ @gmail.comwrote in message
news:11******** **************@ p47g2000hsd.goo glegroups.com.. .
>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 background color and text alignment as the top
level item.

Am I asking too much of the asp:menu control? I went the "-CssClass"
route in order to get my menu option text to center, but this does not
seem to play well with the styling properties of the menu item
controls.
StaticMenuItemS tyle-CssClass="menui tem"
StaticHoverStyl e-CssClass="menui tem_hover"
You don't appear to have set the DynamicMenuItem Style-CssClass and
DynamicHoverSty le-CssClass properties...
--
http://www.markrae.net

Jun 5 '07 #2
On Jun 5, 8:58 am, "Mark Rae" <m...@markNOSPA Mrae.netwrote:
"Steve Richter" <StephenRich... @gmail.comwrote in message

news:11******** **************@ p47g2000hsd.goo glegroups.com.. .
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 background color and text alignment as the top
level item.
Am I asking too much of the asp:menu control? I went the "-CssClass"
route in order to get my menu option text to center, but this does not
seem to play well with the styling properties of the menu item
controls.
StaticMenuItemS tyle-CssClass="menui tem"
StaticHoverStyl e-CssClass="menui tem_hover"

You don't appear to have set the DynamicMenuItem Style-CssClass and
DynamicHoverSty le-CssClass properties...
this helps. thank you.

-Steve

Jun 5 '07 #3

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

Similar topics

2
1573
by: Uriah | last post by:
I have a sort of critical problem that is driving users nuts. My site works fine when running over HTTP but when I switch to HTTPS, an error is generated every time a user mouses over one of the drop down menus. The error is 'This page contains both secure and nonsecure items. Do you want to display the nonsecure items?' and it is driving users nuts. There is definitely nowhere in my code that is referencing a resource over HTTP...
0
1251
by: gjergj | last post by:
Hi, I am trying to use the menu control to create a menu similar to the one that ASP.net site has and I am having a little trouble. The menu is binded to a sitemapdatasource and are both placed on a master page. The sitemapdatasource has ShowStartingMode set to false and the sitemap file looks like: StartNode Home
4
3402
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 I have a theme and right now, the theme structure looks like... App_Themes --Authenticated ----Images ------Menu
1
12008
by: sthrudel | last post by:
Hello! I'm programmatically inserting a navigation asp menu to a page, like this: // Create new Menu Menu menu = new Menu(); // Create new MenuItem MenuItem mainItem = new MenuItem();
0
1627
by: =?Utf-8?B?SmltSGVhdmV5?= | last post by:
I am have a ASP:Menu with static and dynamic menu items. Each of the static items has dynamic menu items. If the user clicks on a static menu item, which has no click event, then menu item changes to a different color which makes it dissapear. It only becomes visable if I move my cursor over the static menu item. I changed my page link properties for "a:visited" and change the color to the value I needed, and this cleared up the...
0
2081
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 still wider than other items accross than items
3
5347
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; margin: 0; padding: 0;
3
2139
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 Text="Maintenance" Value="Maintenance"> <asp:MenuItem Text="Employee Maintenance " Value=" Employee Maintenance ">
0
4143
by: Mark B | last post by:
I have an asp:Menu control in vertical drop-down mode, a portion as displayed: Can anyone tell me how to get Community correctly aligned with Support? Also how do I put a bit of a gap between Community and its gray border? I have the following CSS which I purchased as part of a theme from www.aspthemes.net ...) /*-- ASP Menu --*/
0
7965
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8271
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8380
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8258
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
5847
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5426
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3923
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2399
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1231
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.