Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Client Scripting
Expertise: Beginner
Jul 5, 2000

Changing Link Color with Mouseovers

Question:

How can I change the color of a link when the mouse is over the link? And how can I remove the line that underlines the links? I am using Internet Explorer 4+ and Netscape 4+.

Answer:

Actually, this may be done with CSS, not JavaScript, but I can give you the answer anyway. However, be forewarned that it doesn't work in Netscape versions prior to version 6.

Add the following code inside your tag:


"text-decoration:none" says to not display underlines on anchor tags, while "text-decoration: underline" says to display the underline when the user hovers over the link. In the same way, the text will change to red, because of the "color:red" style.

DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date