473,394 Members | 1,722 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

styling asp.net 2.0 menu control

I am trying to apply the hover style to the Menu Control.
Here is the code snippet

<SharePoint:AspMenu id="QuickLaunchMenu"
DataSourceId="QuickLaunchSiteMap" runat="server"
Orientation="Vertical" StaticDisplayLevels="2" ItemWrap="true"
MaximumDynamicDisplayLevels="0" StaticSubMenuIndent="0"
SkipLinkText="">
<StaticHoverStyle CssClass="ms-LeftNavHover" />
<DynamicHoverStyle CssClass="ms-LeftNavHover"
BackColor="#697D98" />

<LevelMenuItemStyles>
<asp:menuitemstyle CssClass="ms-navheader" />
<asp:menuitemstyle CssClass="ms-navitem" />
</LevelMenuItemStyles>
<LevelSubMenuStyles>
<asp:submenustyle CssClass="ms-navSubMenu1" />
<asp:submenustyle CssClass="ms-navSubMenu2" />
</LevelSubMenuStyles>
<LevelSelectedStyles>
<asp:menuitemstyle CssClass="ms-selectednavheader" />
<asp:menuitemstyle CssClass="ms-selectednav" />
</LevelSelectedStyles>
</SharePoint:AspMenu>

I am trying to apply a background color to a menu item when it is
hovered using the line
<DynamicHoverStyle CssClass="ms-LeftNavHover" BackColor="#697D98" />

However the problem is that , background color gets applied only to
the text, not the whole rectangular item.

I have a different background set in the style ms-navheader which is
applied to the rectangular area around the text. I expect the same
color to be replaced while applying hover style but only the
background of the text is replaced and not the whole item.

Hope I have explained my problem clearly and will appreciate any ideas

Madhur

Aug 3 '07 #1
1 5959
On Aug 3, 2:11 pm, madhur <ahuja.mad...@gmail.comwrote:
I am trying to apply the hover style to the Menu Control.
Here is the code snippet

<SharePoint:AspMenu id="QuickLaunchMenu"
DataSourceId="QuickLaunchSiteMap" runat="server"
Orientation="Vertical" StaticDisplayLevels="2" ItemWrap="true"
MaximumDynamicDisplayLevels="0" StaticSubMenuIndent="0"
SkipLinkText="">
<StaticHoverStyle CssClass="ms-LeftNavHover" />
<DynamicHoverStyle CssClass="ms-LeftNavHover"
BackColor="#697D98" />

<LevelMenuItemStyles>
<asp:menuitemstyle CssClass="ms-navheader" />
<asp:menuitemstyle CssClass="ms-navitem" />
</LevelMenuItemStyles>
<LevelSubMenuStyles>
<asp:submenustyle CssClass="ms-navSubMenu1" />
<asp:submenustyle CssClass="ms-navSubMenu2" />
</LevelSubMenuStyles>
<LevelSelectedStyles>
<asp:menuitemstyle CssClass="ms-selectednavheader" />
<asp:menuitemstyle CssClass="ms-selectednav" />
</LevelSelectedStyles>
</SharePoint:AspMenu>

I am trying to apply a background color to a menu item when it is
hovered using the line
<DynamicHoverStyle CssClass="ms-LeftNavHover" BackColor="#697D98" />

However the problem is that , background color gets applied only to
the text, not the whole rectangular item.

I have a different background set in the style ms-navheader which is
applied to the rectangular area around the text. I expect the same
color to be replaced while applying hover style but only the
background of the text is replaced and not the whole item.

Hope I have explained my problem clearly and will appreciate any ideas

Madhur
CSS can behave strangely because tags inherit styles. I can't tell you
the exact answer, but with CSS I always perform these steps to debug.
First, remove all the styles. Then Apply them 1 at a time. That should
tell you which one is overriding the other.

Aug 4 '07 #2

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

Similar topics

5
by: John Topley | last post by:
Hi, I'm doing some work in an intranet environment where I'm forced to use IE 6.0. Is it possible to style (unordered) nested lists so that the inner list items have a different appearance to...
10
by: Thomas Mlynarczyk | last post by:
Hi, Can I style the root element (HTML) just like any other (and will it work as expected) or are there restrictions to take into account? Thanks in advance, Thomas
0
by: Guillaume Roy | last post by:
Hi, I am running into a few worrying problems with the ASP.NET calendar control. Styling is the problematic issue. Any info you could provide to help me would be greatly appreciated. The...
3
by: Armand Karlsen | last post by:
Is it possible to apply the same styling code as is used on my web page to a CGI-based hit-counter, where the script is a pre-made one supplied by the ISP? The webpage in question is:...
1
by: xx75vulcan | last post by:
Howdy! I've got a javascript menu that was handed to me. I believe it was hand coded- but not sure. I need to find a way to specify the font color and size of the menus. Currently, the menu...
2
by: vkfmj | last post by:
I am bidding on a project that was coded completely in php with basic tables containing the data. My job is to make the site look pretty. I am a designer and I can *read* the php, but am not the...
3
by: Momomo | last post by:
Hi, I am having a problem with a control which is caused by a style on the page which I am not able to trace. If I use the control in a page without any styling it looks ok. Is there a way to...
5
by: GeoffreyD | last post by:
Hi I am working together with an artist who is familiar with CSS and HTML, but we seem to be struggling with some of the more intricate details of the Menu control. From what I understand, it is...
2
AutumnsDecay
by: AutumnsDecay | last post by:
Alright, so I have a website that I'm using a php included menu. Normally I just use images with a rollover counterpart, however this time I just want to use text. I want to set the font-family...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...

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.