[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.6

Menu Hover Styles

Asked by ieuanfawr in Programming for ASP.NET

Hi,

I am having some problems styling a menucontrol in ASP.NET.

The problem I am having is trying to style the HOVER on a SELECTED item.

It does not appear to pick up the HOVER when a selected item is rolled over.

For example....

When the item is NOT selected the hover works correctly (see image hover.jgp) The item being hovered over is dark green (Teal) and a normal node is the light green (#EEF7F7).

Ok, if you see the screen shot "selected.jpg" that is what a menu item appears like once it has been selected. - Gray background and black text is the selected item.


Now, when I hover over the selected item it does not pick up the style (it should be the Teal dark green colour like the other) but the background stays at the selected style gray colour.  How ever the text colour does change to white correctly. (See currenthover.jpg)

Can anyone help me resolve this?

So to reiterate, what i am try to achieve is for the hover to be the same whether the item is selected or not!! The hover properties are for the text to be  color: #FFFFFF and the background to be teal.

As I say the hover does not work correclty on a selected item.


Below is the CSS code the source code, and some shots of how it looks.

I have tried all kinds but I am well and truly stumpted as to why the hover doesnt work on the selected item.

Also on the same topic, how would I place an image onto an item is selected. I have created a photoshop image of this below (see hoverarrow.jpg)

Any suggestions will be greatly appriciated!!!

Thanks.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
<asp:Menu ID="Menu1" runat="server" DataSourceid="sitemap" 
 
BackColor="#EEF7F7" 
 
Width="160px" 
DynamicEnableDefaultPopOutImage="False" 
MaximumDynamicDisplayLevels="0"
StaticEnableDefaultPopOutImage="False" 
BorderStyle="None" BorderWidth="0px"
ItemWrap="True" 
StaticHoverStyle-CssClass="menu-mouse-over">
 
<StaticSelectedStyle  CssClass="menu-selected" />
<LevelMenuItemStyles>
<asp:MenuItemStyle 
 Font-Underline="False" CssClass="menuitemstyle" />
</LevelMenuItemStyles>
 
<StaticHoverStyle CssClass="menu-mouse-over" />
<DynamicHoverStyle CssClass="menu-mouse-over" />
 
 <StaticItemTemplate>
<%# Eval("Text") %>
</StaticItemTemplate>
 
</asp:Menu>
 
 
 
 
/*MENU STYLE*/
 
.menu-mouse-over
{
    color: #FFFFFF;
    background-color: teal;
}
 
.menuitemstyle
{
    border-style: solid none solid solid;
    border-width: 1px;
    border-color: #FFFFFF;
    text-decoration: none;
}
 
.menulevelstyle
{ 
    border-style: solid none solid none; 
    border-top-width: 1px; 
    border-bottom-width: 1px; 
    border-top-color: #FFFFFF; 
    border-bottom-color: #FFFFFF; 
 }
 
.menu-selected
{
    background-color: #E6E6FA;
    color:White;
}
 
.menu-selected a:link
{
    color:black;
}
Attachments:
 
What a menu item looks like when SELECTED
What a menu item looks like when SELECTED
 
 
What a menu item looks like when HOVERED over (darkgreen) is the hovered item
What a menu item looks like when HOVERED over (darkgreen) is the hovered item
 
 
What a menu item looks like when it is SELECTED and then HOVERED over
What a menu item looks like when it is SELECTED and then HOVERED over
 
 
What I would like a SELECTED item to look like (an image of an arrow added when it is selected)
What I would like a SELECTED item to look like (an image of an arrow added when it is selected)
 
 
Related Solutions
Keywords: Menu Hover Styles
 
Loading Advertisement...
 
[+][-]02/03/09 03:34 PM, ID: 23543565Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: Programming for ASP.NET
Sign Up Now!
Solution Provided By: Juan_Barrera
Participating Experts: 1
Solution Grade: A
 
[+][-]06/22/09 10:08 AM, ID: 24684407Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-89 - Hierarchy / EE_QW_3_20080625