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.