Click to See Complete Forum and Search --> : Making TopOfPage anchor go all the way


Duke Will
08-27-2003, 03:24 PM
Down in my page (http://www.wepay.com), I have links to go "Back To Top Of Page." But it doesn't go all the way. Almost, not quite. Like, it stops one BR shy of the top. What am I doing wrong?

Here is the code:

<body text=#000000 vLink=gray aLink=#ff0000 link=#ff0000 background=bgbluestripe.gif>
<a name="#top"></a><font color="#FFFFFF">
<BR>
<center>
<table bgcolor="#FFFFFF" cellpadding="15">
<tr>
<td width="500">

CyCo
08-27-2003, 03:48 PM
...remove as shown in red below...

<body text=#000000 vLink=gray aLink=#ff0000 link=#ff0000 background=bgbluestripe.gif>
<a name="#top"></a><font color="#FFFFFF">
<BR>
<center>
<table bgcolor="#FFFFFF" cellpadding="15">
<tr>
<td width="500">

Duke Will
08-27-2003, 03:59 PM
The font tag, that was dumb. But I thought you have to have a </a> after you do <a name="#top">

No?

(It worked, by the way.)

CyCo
08-27-2003, 04:14 PM
...full documentation can be seen, here:

http://www.w3.org/TR/REC-html40/struct/links.html#h-12.1.3

Duke Will
08-27-2003, 04:34 PM
Originally posted by CyCo
...full documentation can be seen, here:

http://www.w3.org/TR/REC-html40/struct/links.html#h-12.1.3

Maybe I'm dense but it looks to me that they are closing the tag with </a>.

EDIT: Oh, wait, I wa reading about the HREF way. I will look again.

gizmo
08-28-2003, 09:27 AM
I have had the same problem on my site, so I did a global search & replace to remove the </a> from the <a name="#top"> and in IE it makes no difference, but in Mozila ALL text now behaves like a hover link and changes color with the mouse over.:(

CyCo
08-28-2003, 09:34 AM
Please post your code...

gizmo
08-28-2003, 10:28 AM
CyCo, since there are many pages and even the shortest is quite long with multiple linked stylesheets it is not practical to post the code. Furthermore, it is not yet ready to be uploaded to the web.

I have run it through two different html validators and they both complain about omitting the </a>. Having since re-instated it all is well again, so I think I will live with it for now, thanks.

Duke Will
08-28-2003, 10:56 AM
I still don't understand about NOT having the </a>. I'm not very bright but I read up on it and it seems to me that </a> IS supposed to be there. That W3 is like it's written by lawyers. I'm like, huh?

Da Warriah
08-28-2003, 11:03 AM
Start tag: required, End tag: required

straight outta the W3C specs...;)

and you might try putting some text inside the <a></a> tags, or possibly an &nbsp; would do fine...that might give the anchor something to...er...anchor to...