By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,214 Members | 2,099 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,214 IT Pros & Developers. It's quick & easy.

using asp:menu to create drop down menu

P: n/a
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;
}

Jun 5 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"Steve Richter" <St************@gmail.comwrote in message
news:11**********************@p47g2000hsd.googlegr 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

Jun 5 '07 #2

P: n/a
On Jun 5, 8:58 am, "Mark Rae" <m...@markNOSPAMrae.netwrote:
"Steve Richter" <StephenRich...@gmail.comwrote in message

news:11**********************@p47g2000hsd.googlegr 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

Jun 5 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.