MouseOver effects in Visual Studios 2008

Reply

Join Date: Dec 2007
Posts: 65
Reputation: CodeBoy101 is an unknown quantity at this point 
Solved Threads: 0
CodeBoy101's Avatar
CodeBoy101 CodeBoy101 is offline Offline
Junior Poster in Training

MouseOver effects in Visual Studios 2008

 
0
  #1
Mar 23rd, 2009
Hi all!

I am using Visual Studio 2008 and I was wondering is there a way to get the colour of text in a menu item to change color during a mouse over. So for example, if I was cycling through a list of items, the item that was currently selected would be black, and all other items would be grey.

Thanx in advance!!!
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 127
Reputation: MoralTerror is an unknown quantity at this point 
Solved Threads: 10
MoralTerror's Avatar
MoralTerror MoralTerror is offline Offline
Junior Poster

Re: MouseOver effects in Visual Studios 2008

 
0
  #2
Mar 24th, 2009
Yes create a css class in a stylesheet for the text color you want then from the menu properties under Styles you can enter the class name in the CssClass field for DynamicHoverStyle and/or StaticHoverStyle
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 25
Reputation: anitha joe has a little shameless behaviour in the past 
Solved Threads: 0
anitha joe anitha joe is offline Offline
Light Poster

Re: MouseOver effects in Visual Studios 2008

 
0
  #3
Mar 24th, 2009
Yes you can do that.
Do this in your stylesheet (.css file):
  1. .colorchange
  2. {
  3. color:gray;
  4. }
  5. .colorchange:hover
  6. {
  7. color:black;
  8. }

In your code file whereever you are creating the menu, include the created style name(colorchange).
for example if its a link, do the following
<a class="colorchange" href="[your link]">Item1</a>
The above code will keep the color of the text(Item1) as gray normally but when you hover(do a mouse over), color will change to black.

Hope that helps.
Last edited by peter_budo; Mar 26th, 2009 at 9:40 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the ASP.NET Forum


Views: 1039 | Replies: 2
Thread Tools Search this Thread



Tag cloud for ASP.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2010 DaniWeb® LLC