asp:menu cssclass?


K

Kevin L. Kitchens

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...> tags to no effect.

Any ideas?

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

<asp:menu
id="menuMain"
runat="server"
orientation="Horizontal"
width="100%"
backcolor="#0000dd"
forecolor="#ffffff"
statichoverstyle-backcolor="#0000dd"
statichoverstyle-forecolor="#ffcc00"
staticmenuitemstyle-backcolor="#0000dd"
staticmenuitemstyle-forecolor="#ffffff"
dynamicmenuitemstyle-backcolor="#0000dd"
dynamicmenuitemstyle-forecolor="#ffffff"
dynamichoverstyle-backcolor="#0000dd"
dynamichoverstyle-forecolor="#ffcc00"
staticsubmenuindent="10px" enabled="true"
staticdisplaylevels="1"
maximumdynamicdisplaylevels="4"
disappearafter="1000"
dynamichorizontaloffset="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>
 
Ad

Advertisements

C

Cowboy \(Gregory A. Beamer\)

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"MenuItemStyle and "X"HoverStyle and get results.

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

<asp:Menu ID="MainMenu" runat="server"
DataSourceID="MyJaguarWatchSiteMapSource"

Orientation="Horizontal" StaticEnableDefaultPopOutImage="False">

<StaticMenuItemStyle CssClass="TopMenuNormal" />

<DynamicHoverStyle CssClass="DropdownMenuHover" />

<DynamicMenuItemStyle BorderColor="#293F34" BorderWidth="1px"
CssClass="DropdownMenuNormal"

HorizontalPadding="3px" VerticalPadding="2px" />

<StaticHoverStyle CssClass="TopMenuHover" />

</asp:Menu>




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

*************************************************
Think outside of the box!
*************************************************
 
Ad

Advertisements

K

Kevin L. Kitchens

Hey Greg thanks! Glad it wasn't just me!

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top