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: Active Server Pages (ASP)
Expertise: Beginner
Jul 9, 1999

Underlining Links on Mouse Over Only

Question:

When I add a hyperlink to an ASP page, the link appears underlined. How can I remove the underline from the link? I only want the line to appear when I point the mouse over to the hyperlink. There are examples in the DevX sidebar.

Answer:

You can achieve the effect of underlining links on mouse over only by using style sheets.

A link belongs to the anchor tag "A". Whatever style you associate with the anchor tag will be applied to all links on your page. Internet Explorer supports the "hover" mode of link tags. The "hover" mode allows you to set a different style for the hover portion of the "A" tag.

Add the following code to your HTML page:



This will display your links with NO underlines, except when you point to mouse to them.

Having explained the technique, I do not recommend applying it. People are used to seeing links underlined. Users may get confused in a web site where the links are not obvious. Leave your links underlined, unless you plan to color them or make them stand out in another way.

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