473,847 Members | 1,482 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

asp:menu cssclass?

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 tags should I be setting for how the menu is
eventually rendered? spans? tables? td? div?

In the example below I resorted to using inline coloring and still not
working. The menu is inside of a table cell (td) element. I can see the
items (but they are blue on blue and hard to read), but no color changes
seem to have much effect. I've also tried using the <static...and
<dynamic...ta gs to no effect.

Any ideas?

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

<asp:menu
id="menuMain"
runat="server"
orientation="Ho rizontal"
width="100%"
backcolor="#000 0dd"
forecolor="#fff fff"
statichoverstyl e-backcolor="#000 0dd"
statichoverstyl e-forecolor="#ffc c00"
staticmenuitems tyle-backcolor="#000 0dd"
staticmenuitems tyle-forecolor="#fff fff"
dynamicmenuitem style-backcolor="#000 0dd"
dynamicmenuitem style-forecolor="#fff fff"
dynamichoversty le-backcolor="#000 0dd"
dynamichoversty le-forecolor="#ffc c00"
staticsubmenuin dent="10px" enabled="true"
staticdisplayle vels="1"
maximumdynamicd isplaylevels="4 "
disappearafter= "1000"
dynamichorizont aloffset="2"
font-names="Verdana"
font-size="11px">

<items>
<asp:menuitem
text="Home" navigateurl="/pv/" value="Home" >
</asp:menuitem>
<asp:menuitem
text="About" value="About" >
<asp:menuitem
text="Contact"
navigateurl="/pv/Contact.aspx"
value="Contact" >
</asp:menuitem>
<asp:menuitem
text="Privacy Policy"
navigateurl="/pv//Privacy.aspx"
value="Privacy Policy" >
</asp:menuitem>
</asp:menuitem>
</items>
</asp:menu>
Oct 17 '06 #1
2 9555
I pounded on this one for awhile, as well, and do not have a complete
answer, but I can tell you what I found.

1. Use the specific tags (lower down if you are using sorted in the
properties window), not the generic on the asp:menu (see below)
2. The MenuStyle seems to do nothing for me, neither dyanmic or static
3. I use "X"MenuItemStyl e and "X"HoverSty le and get results.

I am using CSS overall, but you can see the border settings in the
DynamicMenuItem Style (had problems with it in the CSS that I still have to
conquer):

<asp:Menu ID="MainMenu" runat="server"
DataSourceID="M yJaguarWatchSit eMapSource"

Orientation="Ho rizontal" StaticEnableDef aultPopOutImage ="False">

<StaticMenuItem Style CssClass="TopMe nuNormal" />

<DynamicHoverSt yle CssClass="Dropd ownMenuHover" />

<DynamicMenuIte mStyle BorderColor="#2 93F34" BorderWidth="1p x"
CssClass="Dropd ownMenuNormal"

HorizontalPaddi ng="3px" VerticalPadding ="2px" />

<StaticHoverSty le CssClass="TopMe nuHover" />

</asp:Menu>


--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*************** *************** *************** ****
Think outside of the box!
*************** *************** *************** ****
"Kevin L. Kitchens" <pe****@yahoo.c omwrote in message
news:eL******** ******@TK2MSFTN GP02.phx.gbl...
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 tags should I be setting for how the menu is
eventually rendered? spans? tables? td? div?

In the example below I resorted to using inline coloring and still not
working. The menu is inside of a table cell (td) element. I can see the
items (but they are blue on blue and hard to read), but no color changes
seem to have much effect. I've also tried using the <static...and
<dynamic...ta gs to no effect.

Any ideas?

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

<asp:menu
id="menuMain"
runat="server"
orientation="Ho rizontal"
width="100%"
backcolor="#000 0dd"
forecolor="#fff fff"
statichoverstyl e-backcolor="#000 0dd"
statichoverstyl e-forecolor="#ffc c00"
staticmenuitems tyle-backcolor="#000 0dd"
staticmenuitems tyle-forecolor="#fff fff"
dynamicmenuitem style-backcolor="#000 0dd"
dynamicmenuitem style-forecolor="#fff fff"
dynamichoversty le-backcolor="#000 0dd"
dynamichoversty le-forecolor="#ffc c00"
staticsubmenuin dent="10px" enabled="true"
staticdisplayle vels="1"
maximumdynamicd isplaylevels="4 "
disappearafter= "1000"
dynamichorizont aloffset="2" font-names="Verdana"
font-size="11px">

<items>
<asp:menuitem
text="Home" navigateurl="/pv/" value="Home" >
</asp:menuitem>
<asp:menuitem
text="About" value="About" >
<asp:menuitem
text="Contact" navigateurl="/pv/Contact.aspx"
value="Contact" >
</asp:menuitem>
<asp:menuitem
text="Privacy Policy"
navigateurl="/pv//Privacy.aspx"
value="Privacy Policy" >
</asp:menuitem>
</asp:menuitem>
</items>
</asp:menu>

Oct 18 '06 #2
Hey Greg thanks! Glad it wasn't just me!

Can you send your CSS as well? Would be a big help.

Cowboy (Gregory A. Beamer) wrote:
I pounded on this one for awhile, as well, and do not have a complete
answer, but I can tell you what I found.

1. Use the specific tags (lower down if you are using sorted in the
properties window), not the generic on the asp:menu (see below)
2. The MenuStyle seems to do nothing for me, neither dyanmic or static
3. I use "X"MenuItemStyl e and "X"HoverSty le and get results.

I am using CSS overall, but you can see the border settings in the
DynamicMenuItem Style (had problems with it in the CSS that I still have to
conquer):

<asp:Menu ID="MainMenu" runat="server"
DataSourceID="M yJaguarWatchSit eMapSource"

Orientation="Ho rizontal" StaticEnableDef aultPopOutImage ="False">

<StaticMenuItem Style CssClass="TopMe nuNormal" />

<DynamicHoverSt yle CssClass="Dropd ownMenuHover" />

<DynamicMenuIte mStyle BorderColor="#2 93F34" BorderWidth="1p x"
CssClass="Dropd ownMenuNormal"

HorizontalPaddi ng="3px" VerticalPadding ="2px" />

<StaticHoverSty le CssClass="TopMe nuHover" />

</asp:Menu>

Oct 18 '06 #3

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

Similar topics

7
2720
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 server returned an error: (500) Internal Server Error." I found a post that suggested to catch the WebException to retrieve the actual HttpWebResponse object for more information. The response returned is shown below. At first I thought this was a...
2
5612
by: jason | last post by:
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>
1
12029
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();
4
1177
by: Fuzzhead | last post by:
I am having troube getting my menu control to render properly on the pordcution server. It works perfectly on my one system, but when I uploaded it the dynamic part of the menu does not function. I also had a problem with the default PopOut image, but when I changed it to a custom one that problem was solved, so I think it might have something to do with the same root cause. Does anyone know how to fix this?
13
3360
by: Smith | last post by:
Hello, Does someone know a link to an example of customization of an asp:menu? Many thansk in advance. S
2
5680
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 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...
0
2111
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
2159
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 ">
1
1870
by: mollerm8 | last post by:
Hi there, Want to know if it is possible to To blow-up the text or image on a menu item (top or left) if a mouse moves over it in ASP.NET? Would it just be an adjustment to StaticHoverStyle or DynamicHoverStyle. I've got the following code (What adjustement would you recommend)? <asp:Menu DataSourceID="XmlDataSource1" EnableViewState="true" ID="Menu2" runat="server" ...
0
9732
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10988
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
10652
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...
1
10712
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7058
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
5723
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5914
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4536
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
2
4126
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.