Wednesday, November 17, 2010

How to change website link colour after mouse moves over it ?

i am worjing on wabsite.and want to add this 2 things to it.



1) when ever the mouse pointer is moved over the link ,its color should change.

2) in the top menu links,which drops down after placing the mouse pointer over it.with more links.



please share ur ideas.How to change website link colour after mouse moves over it ?
as for the first item, you use CSS



a:hover{

color:#ccc;

}



*note - color is given the color value in hex





The second item, of a css drop menu - it's a little more complicated. The best way is to create a nested list with an id, and set the style value 'display:none'. This hides the item. In the CSS, target it as such:



#outer_link:hover #inner_link{

display:block;

}



you will need to add javascript in order for the script to work in IE, and it gets a little more complicated. Check the like below, for a full description



http://www.alistapart.com/articles/horiz…How to change website link colour after mouse moves over it ?
What program are you developing in?

You might want to browse http://www.dynamicdrive.com for some nifty HTLM code.
try this link for drop menu software http://www.google.com/search?q=drop+menu…



to change the link text color on mouse over use this





Script for changing linked text color on mouseover:

This only works with the IE browsers. Add this code within your %26lt;head%26gt; tags. To keep the underline on your links, replace ';none'; with ';underline'; Change ';YourColor'; with the hexidecimal number of color required.







%26lt;style

type=';text/css';%26gt; %26lt;!-- A:link { text-decoration: none; color:#YourColor

} A:visited { text-decoration: none; color:#YourColor } A:hover { text-decoration:

none; color:#YourColor } --%26gt; %26lt;/style%26gt;

No comments:

Post a Comment