Saturday 4 June 2011

When you make your own link and you put the mouse on it how do you make it change color?

like on myspace


Ex: when your mouse isn%26#039;t on the edit profile link its light blue then when you put your mouse on the edit profile button it changes from light blue to purple..


how do you do that when you make your own link?|||give the link a class so that you can address it in your CSS





like this





%26lt;a href=%26quot;URL%26quot; class=%26quot;myLink%26quot;%26gt; text here %26lt;/a%26gt;





and then in your CSS, use this





a.myLink:hover {color:red;}|||You need to include this CSS code:





%26lt;style type=%26quot;text/css%26quot;%26gt;


a:hover {color:#3399FF}


%26lt;/style%26gt;





Replace the numbers (hex code) after the # sign to customize the hover color. You can find some hex codes here: www.html-color-codes.com








[NOTE] If you want to only change the hover color of one specific link, use this in your HTML:


%26lt;a href=%26quot;URL%26quot; class=%26quot;YourClass%26quot;%26gt; text here%26lt;/a%26gt;





And then use this in your CSS:


%26lt;style type=%26quot;text/css%26quot;%26gt;


a.YourClass:hover {color:#3399FF}


%26lt;/style%26gt;





And again, change the hex code as you wish.





Hope this helps!