Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > using asp:menu to create drop down menu

Reply
Thread Tools

using asp:menu to create drop down menu

 
 
Steve Richter
Guest
Posts: n/a
 
      06-05-2007
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=Horizontal
StaticMenuItemStyle-CssClass="menuitem"
StaticHoverStyle-CssClass="menuitem_hover"
OnMenuItemClick="Menu1_MenuItemClick">

<levelsubmenustyles>
<asp:submenustyle CssClass="menuitemz" />
</levelsubmenustyles>

<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="UploadCode" />
</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_hover
{
background-color:Yellow;
}

 
Reply With Quote
 
 
 
 
Mark Rae
Guest
Posts: n/a
 
      06-05-2007
"Steve Richter" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.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.


> StaticMenuItemStyle-CssClass="menuitem"
> StaticHoverStyle-CssClass="menuitem_hover"


You don't appear to have set the DynamicMenuItemStyle-CssClass and
DynamicHoverStyle-CssClass properties...


--
http://www.markrae.net

 
Reply With Quote
 
 
 
 
Steve Richter
Guest
Posts: n/a
 
      06-05-2007
On Jun 5, 8:58 am, "Mark Rae" <(E-Mail Removed)> wrote:
> "Steve Richter" <(E-Mail Removed)> wrote in message
>
> news:(E-Mail Removed) oups.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.
> > StaticMenuItemStyle-CssClass="menuitem"
> > StaticHoverStyle-CssClass="menuitem_hover"

>
> You don't appear to have set the DynamicMenuItemStyle-CssClass and
> DynamicHoverStyle-CssClass properties...


this helps. thank you.

-Steve



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Affecting a dynamically created drop down from another dynamically created drop down. msimmons ASP .Net 0 07-16-2009 03:17 PM
retrive preselected value in second drop down list from the first drop down list weiwei ASP .Net 0 01-05-2007 07:29 PM
Auto Drop down a Drop Down List xxbmichae1@supergambler.com Javascript 5 11-23-2005 01:35 AM
how to create a drop down menu using vb.net Logan ASP .Net 2 01-31-2005 01:23 AM
New to .NET, can I have one drop down box control the data of another drop down box using a database? SirPoonga ASP .Net 2 01-07-2005 10:44 PM



Advertisments