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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing color onmouseover with CSS

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi, this is my problem: I have some links and I want them to change their color when the mouse comes over them. I wonder if that can be done with JavaScript and CSS. If that's not possible, any other solutions will be also great.
Thanks X-)
 
you could do :
Code:
<style>
A:hover {color:putAcolorHere;}
</style>
hope it helps The pen is mightier than the sword.
 
You might as well specify all colours, not just the hover colour. And if you want different effects for eg menu bar or internal links or whatever then you can use:

<style type=&quot;text/css&quot;>
<!--

a:link.color1 {color: ??; text-decoration: none; }
a:active.color1 {color: ; text-decoration: none; }
a:visited.color1 {color: ; text-decoration: none; }
a:hover.color1 {color: ; text-decoration: none; }

a:link.color2 {color: ; text-decoration: none; }
a:active.color2 {color: ; text-decoration: none; }
a:visited.color2 {color: ; text-decoration: none; }
a:hover.color2 {color: ; text-decoration: none; }

-->
</style>



É **new site coming soon**
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top