Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP.net 2.0 menu control question (for all the menu experts)

Status
Not open for further replies.

simpgmr

Programmer
Joined
Jan 16, 2007
Messages
12
Location
US
Is there a way change the image for a menu or sub menu when the mouse hovers over it using a menu property or whatever. You can write a java script program with about two hundred lines of code but I am trying to avoid doing that. A menu similar to the one I want to make is on this web site. ( I am kinda new to ASP.net 2.0. Help.
Simeon
Thanks
 
Yes, you can use the CSS "hover" class although this isn't supported on all browsers.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Does each menu item have a separate hover class.
Example: Lets say I had the following menu with the following menu items.

menu1
A+
B
C
D+
E
F

Does B, C, E, and F have separate hover classes?
 
If you want them to display different images then yes, otherwise no.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Ok, I understand the concept, but I can't get it to work. If I have a menu called menu1, which has a menu of HOME and a sub menu with a value of FAQs.... do I make the css code as follows. I tried this and it doesent work. What am I doing wrong?

menu1, FAQs a:hover
{
background-image: url(images/autogen/FAQs_NRp2.gif);
}

 
You aren't referencing the menu items correctly. See my post in thread855-1326501 on how you could reference them.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top