Forum Moderators: not2easy

Message Too Old, No Replies

A link underline showing underline with anchors in ie6

         

concepts99

4:17 pm on Oct 17, 2010 (gmt 0)

10+ Year Member



Hello,

I have an anchor at the top of a page

<a name="topofpage">

with this in place and in IE6 (not the latest firefox or safari)

and with css



A:hover {
COLOR: blue;TEXT-DECORATION: underline;
}

the entire area (text, etc) under the anchor gets underlined on HOVER

Is there a way to code this or a trick to this for older IE browsers?

rocknbil

6:39 pm on Oct 17, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



the entire area (text, etc) under the anchor gets underlined on HOVER


No ending </a>?

<a name="topofpage"></a>

At any rate these are unnecessary and the name attribute is deprecated for non-form elements, in fact a # link to it may fail in some browsers. Use ID instead, and additionally you can assign it to something other than an empty anchor.

<h1 id="topofpage">The real top</h1>

concepts99

8:03 pm on Oct 17, 2010 (gmt 0)

10+ Year Member



Hi,

Yes, I have figured the a name tag is outdated

I have since converted it to
<div id="topofpage"></div>
which works well, thank you for the help

Major_Payne

8:45 pm on Oct 17, 2010 (gmt 0)



Validates with XHTML 1.0:

Top of page:
<div><a id="top"></a></div


Bottom of page (image used):
<!-- START Return to Top -->
<div id="return"><a href="#top" title="RETURN TO TOP"><img src="imgs/Return-to-Top.png" alt="Return to Top" /></a></div>
<!-- END Return to Top -->


Named Anchors:

Those are called named anchors. Scroll down to the title "The name Attribute" for good examples: [w3schools.com...]

You can edit and try your own code out online here: [w3schools.com...]

Examples:

10 Linking from a section on one web page to a section on another web page:

Using an image as the link:

<div><a href="http://your_site.com/html_links.htm#animals"><img style="width: XXpx; height: YYpx; border: 0;" src="Path to image" alt="Text Description"></a></div>


Text Link:

<div><a href="http://your_site.com/html_links.htm#animals">Visit My Animals Photos</a></div>


Target Text Link on External Page:

<div><a name="animals">My Animals Photos</a></div>