PDA

View Full Version : "Named Anchor" Hack/Workaround for Safari??




DesignIt
Dec 15, 2005, 12:33 PM
Does anybody know of a work around for "named anchors" in Safari? Safari is the only browser where this (named anchors) does not work.



OutThere
Dec 15, 2005, 12:51 PM
As far as I know there is no problem...I just made a quick page with the following code and it worked perfectly.

<html>
<head>
<title>
Test Page
</title>
</head>
<body>
<a href="#whatever">Test Link</a>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br>
<a name="whatever">It worked!
</body>
</html>

DesignIt
Dec 15, 2005, 12:57 PM
As far as I know there is no problem...I just made a quick page with the following code and it worked perfectly.

<html>
<head>
<title>
Test Page
</title>
</head>
<body>
<a href="#whatever">Test Link</a>
<br><br><br><br>
<a name="whatever">It worked!
</body>
</html>


That doesn't really show anything because the link isn't "moving" the page anywhere.

OutThere
Dec 15, 2005, 01:07 PM
Fixed

DesignIt
Dec 15, 2005, 01:23 PM
Fixed

THanks for your reply and effort, but with all due respect, nothing has been fixed. =)

encephalon
Dec 15, 2005, 01:28 PM
Worked for me

revisionA
Dec 15, 2005, 01:38 PM
check a list apart or boxes and arrows
!
$

CanadaRAM
Dec 15, 2005, 01:57 PM
I'm sorry, you'll have to qualify your question better.

"Safari is the only browser where this (named anchors) does not work." This general assertation is not true.

I've just visited one of my own sites with named anchors (Dreamweaver coded) in Safari (OS 10.3.9) and it works perfectly.

If you have a problem with a specific version of Safari, or specific HTML code, please elaborate.

DesignIt
Dec 15, 2005, 02:31 PM
I'm sorry, you'll have to qualify your question better.

"Safari is the only browser where this (named anchors) does not work." This general assertation is not true.

I've just visited one of my own sites with named anchors (Dreamweaver coded) in Safari (OS 10.3.9) and it works perfectly.

If you have a problem with a specific version of Safari, or specific HTML code, please elaborate.

Very true. Pretty vague question. Here is a link to the page that doesn't work:

link removed temporarily

CanadaRAM
Dec 15, 2005, 02:47 PM
Very true. Pretty vague question. Here is a link to the page that doesn't work:

http://dev.nootgroup.com/dev.theshores/TSF05005_v1j/features.htm

I think Safari need <A Name= instead of <A ID=
You can combine the two, for backwards compatibilty
<a id="anchorname" name="anchorname" />

http://www.jimthatcher.com/skipnav.htm

OutThere
Dec 15, 2005, 02:48 PM
THanks for your reply and effort, but with all due respect, nothing has been fixed. =)

Well technically I fixed my example so that it demonstrated that named anchors do in fact work in Safari...now I did not fix your page, I'll admit that. Maybe it has something to do with the fact that it's linking to a different scrolling section? :confused:

DesignIt
Dec 15, 2005, 02:53 PM
I think Safari need <A Name= instead of <A ID=
You can combine the two, for backwards compatibilty
<a id="anchorname" name="anchorname" />

http://www.jimthatcher.com/skipnav.htm

I've tried that too previously. That's why I've concluded that it is possible only thru javascript.

radiantm3
Dec 15, 2005, 05:36 PM
I'm not sure if this is causing the issue, but you have multiple ID's with the same name. ID's have to be unique to a page (meaning only 1 instance of an ID on a page). You can anchor directly to any tag with an ID. Here is the best way to do it:


<ul class="skiplist">
<li><a href="#cont">Skip Navigation.</a></li>
<li><a href="#side">Jump to Side Bar.</a></li>
</ul>
.
.
.
.
.
.
.
.
.
.
<div id="cont">
All your Main content is in here.
</div>
<div id="side">
All your sidebar elements here.
</div>



The links will jump to the ID's respectively. You are just using way too many unnecessary tags, classes, and IDs.

CanadaRAM
Dec 15, 2005, 06:02 PM
I've tried that too previously. That's why I've concluded that it is possible only thru javascript.
OK, sorry to have taken up your time with things you already tried :(

DesignIt
Dec 16, 2005, 09:28 AM
OK, sorry to have taken up your time with things you already tried :(

I appreciate your help, I hope you didn't take that in the wrong way.
Thanks again! =)

DesignIt
Dec 16, 2005, 09:41 AM
I'm not sure if this is causing the issue, but you have multiple ID's with the same name. ID's have to be unique to a page (meaning only 1 instance of an ID on a page). You can anchor directly to any tag with an ID. Here is the best way to do it:


<ul class="skiplist">
<li><a href="#cont">Skip Navigation.</a></li>
<li><a href="#side">Jump to Side Bar.</a></li>
</ul>
.
.
.
.
.
.
.
.
.
.
<div id="cont">
All your Main content is in here.
</div>
<div id="side">
All your sidebar elements here.
</div>



The links will jump to the ID's respectively. You are just using way too many unnecessary tags, classes, and IDs.

Thanks. I realize I am no expert with CSS and still learning. Although, as far as I know, I am not using any duplicate ID's. Where are you finding multiple ID's with the same name?

radiantm3
Dec 16, 2005, 03:10 PM
I just saw it once, at the top so I assumed there's a chance there might be more:


<ul class="skiplist">
<li class="skip"><a href="#cont" id="menu">Skip Navigation.</a></li>
<li class="skip"><a href="#side" id="menu">Jump to Side Bar.</a></li>
</ul>


You are using the menu ID twice here. You could really optimize that block of code too. You would have the same amount of styling capability with something like this:


<ul id="skiplist">
<li><a href="#cont">Skip Navigation.</a></li>
<li><a href="#side">Jump to Side Bar.</a></li>
</ul>


Since you only have 1 instance of your #skiplist on a page, make it an ID. Then you can style each element within skiplist like this:

#skiplist li{}
#skiplist li a{}

No need to add classes and IDs to the li and a tags.

DesignIt
Dec 16, 2005, 05:41 PM
I just saw it once, at the top so I assumed there's a chance there might be more:


<ul class="skiplist">
<li class="skip"><a href="#cont" id="menu">Skip Navigation.</a></li>
<li class="skip"><a href="#side" id="menu">Jump to Side Bar.</a></li>
</ul>


You are using the menu ID twice here. You could really optimize that block of code too. You would have the same amount of styling capability with something like this:


<ul id="skiplist">
<li><a href="#cont">Skip Navigation.</a></li>
<li><a href="#side">Jump to Side Bar.</a></li>
</ul>


Since you only have 1 instance of your #skiplist on a page, make it an ID. Then you can style each element within skiplist like this:

#skiplist li{}
#skiplist li a{}


No need to add classes and IDs to the li and a tags.


Oh...you are referring to the span class I have to change the color of the bullets. This is the first time I have used a li, in case it wasn't obvious.
:D I'm not too terribly concerned about those, as they aren't what's causing the "anchors" to not work.

Thanks for your tips!

radiantm3
Dec 16, 2005, 06:27 PM
Oh...you are referring to the span class I have to change the color of the bullets. This is the first time I have used a li, in case it wasn't obvious.
:D I'm not too terribly concerned about those, as they aren't what's causing the "anchors" to not work.

Thanks for your tips!

Well you can never tell what is causing a bug until you can fix all the errors to eliminate the possibilities. I always start by making sure my pages validate:
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.jimthatcher.com%2Fskipnav.htm

rd10332
Dec 18, 2005, 08:09 AM
I'm still having a little trouble. I want to link from page 1 to an anchor on page 2. But when I click on the link in safari it doesn't work, it only brings me to the page itself, not to the anchor, while it does work with IE (mac). Anybody any thoughts on this?

The anchor does work in safari when I place the link on the same page btw.

Thanks, Tim

rendezvouscp
Dec 18, 2005, 10:40 AM
I'm still having a little trouble. I want to link from page 1 to an anchor on page 2. But when I click on the link in safari it doesn't work, it only brings me to the page itself, not to the anchor, while it does work with IE (mac). Anybody any thoughts on this?

The anchor does work in safari when I place the link on the same page btw.

Thanks, Tim

I think that this is an actual limitation on Safari's part. I don't think I've ever seen this work properly. :(
-Chase

radiantm3
Dec 18, 2005, 05:57 PM
I think that this is an actual limitation on Safari's part. I don't think I've ever seen this work properly. :(
-Chase

It works fine for me on my website. Are you guys using the latest version of safari?

DesignIt
Dec 19, 2005, 10:35 AM
Well you can never tell what is causing a bug until you can fix all the errors to eliminate the possibilities. I always start by making sure my pages validate:
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.jimthatcher.com%2Fskipnav.htm

I did validate this page and the only thing that didn't pass was the fact that I have an image sitting inside of the, ul and li, coding. I'm not sure why this isn't allowed. If I don't put the image there, I don't like how it sits up really high away from the list.

Also, even with the image in the correct location (ie-page validated), the name anchor still doesn't work in Safari.

radiantm3
Dec 19, 2005, 02:03 PM
I did validate this page and the only thing that didn't pass was the fact that I have an image sitting inside of the, ul and li, coding. I'm not sure why this isn't allowed. If I don't put the image there, I don't like how it sits up really high away from the list.

Also, even with the image in the correct location (ie-page validated), the name anchor still doesn't work in Safari.

If you are using the latest version of safari then you must still have a problem with your code because name anchoring works on all of my websites just fine in safari.

Also, I still get validation errors on that page on your site. You still have 2 of the same IDs which I mentioned towards the beginning of this thread. :o

DesignIt
Dec 19, 2005, 02:16 PM
If you are using the latest version of safari then you must still have a problem with your code because name anchoring works on all of my websites just fine in safari.

Also, I still get validation errors on that page on your site. You still have 2 of the same IDs which I mentioned towards the beginning of this thread. :o

I guess I am at a loss then because I am not aware of the 2 ID's you are referring to.

:confused:

edit: I am using this version of Safari: 1.3.1 (v312.3.3)

radiantm3
Dec 19, 2005, 03:32 PM
I guess I am at a loss then because I am not aware of the 2 ID's you are referring to.

:confused:

edit: I am using this version of Safari: 1.3.1 (v312.3.3)

The older version of safari could be the problem. Try this:

http://mac.7motion.com/software.php#desktop

Does that link automatically anchor you to the correct section or does it stay at the top? It works for me in Safari v2.0.2. If not, then it must be a safari (version) issue.

DesignIt
Dec 19, 2005, 04:44 PM
The older version of safari could be the problem. Try this:

http://mac.7motion.com/software.php#desktop

Does that link automatically anchor you to the correct section or does it stay at the top? It works for me in Safari v2.0.2. If not, then it must be a safari (version) issue.

It sends me to the top the EvoCam section?

radiantm3
Dec 19, 2005, 06:42 PM
It sends me to the top the EvoCam section?

Yes, that is correct. Which means it does work. :)

DesignIt
Dec 20, 2005, 09:10 AM
Yes, that is correct. Which means it does work. :)

Ha haa, and all that time I was looking for a link under Evocam for the Safari update. lol

lectro33
Dec 29, 2005, 01:27 PM
First, that link didn't work in Safari 1.3.

Second, I'd like to clarify the problem a bit:

I have some anchor tags (the <a name='something'> kind) that are inside of a div section. When I click a link on a page (that's within the same div section) which points to the named anchor tag, it doesn't just scroll the document horizontally so that the named anchor is at the top of the div section. It moves the entire div section so that named anchor is at the top left of the entire browser window, shifting my entire page up and to the left, so that elements that were to the left of the div section are no longer visible.

I'd like to be able to support those who are not yet on Tiger and can't use Safari 2. Is there any way to do this???

newnomad
Dec 29, 2005, 02:04 PM
I am afraid that this is a specific safari bug, even on 2.0.2, the latest version.
Please share if you found a workaround (name and id combined,..overflow auto, hidden,....)

http://www.quirksmode.org/bugreports/archives/2004/12/linking_into_overflowing_absolutely_positoned_elem.html

oettinger
Oct 15, 2008, 11:24 AM
Hi. Sorry to cont. this
But I just donít get it. I do not know anything about making web pages, but Iím doing in anywho. Did this fantastic page www.solarmassacre.dk
But just canít get the anchors to work in safari. Iíve created the page in Dreamweaver.

have no idea how much of the code you want so here is everything:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>SOLARMASSACRE</title>
<style type="text/css">
<!--
body,td,th {
color: #000000;
}
body {
background-color: #000000;
}
#apDiv1 {
position:absolute;
left:172px;
top:95px;
width:173px;
height:137px;
z-index:10;
}
#apDiv2 {
position:absolute;
left:109px;
top:1431px;
width:127px;
height:123px;
z-index:2;
}
#apDiv3 {
position:absolute;
left:314px;
top:711px;
width:100px;
height:114px;
z-index:3;
}
#apDiv4 {
position:absolute;
left:78px;
top:-67px;
width:100px;
height:86px;
z-index:4;
}
#apDiv5 {
position:absolute;
left:387px;
top:1714px;
width:259px;
height:218px;
z-index:5;
}
#apDiv6 {
position:absolute;
left:45px;
top:3220px;
width:228px;
height:1077px;
z-index:11;
}
#apDiv7 {
position:absolute;
left:373px;
top:4310px;
width:264px;
height:284px;
z-index:12;
}
#apDiv8 {
position:absolute;
left:379px;
top:2777px;
width:39px;
height:40px;
z-index:13;
}
#apDiv9 {
position:absolute;
left:336px;
top:2756px;
width:25px;
height:21px;
z-index:14;
}
#apDiv10 {
position:absolute;
left:294px;
top:5846px;
width:48px;
height:28px;
z-index:15;
}
#apDiv11 {
position:absolute;
left:519px;
top:2756px;
width:58px;
height:56px;
z-index:16;
}
#apDiv12 {
position:absolute;
left:726px;
top:140px;
width:214px;
height:312px;
z-index:17;
}
.style1 {
font-family: "Times New Roman", Times, serif;
font-size: 14px;
}
#apDiv13 {
position:absolute;
left:729px;
top:181px;
width:480px;
height:72px;
z-index:18;
}
#apDiv14 {
position:absolute;
left:398px;
top:1740px;
width:23px;
height:22px;
z-index:18;
}
#apDiv15 {
position:absolute;
left:9px;
top:3217px;
width:18px;
height:24px;
z-index:19;
}
#apDiv16 {
position:absolute;
left:577px;
top:2253px;
width:165px;
height:40px;
z-index:20;
}
#apDiv17 {
position:absolute;
left:4px;
top:0px;
width:33px;
height:15px;
z-index:21;
}
#apDiv18 {
position:absolute;
left:407px;
top:5826px;
width:36px;
height:34px;
z-index:22;
}
#apDiv19 {
position:absolute;
left:173px;
top:6036px;
width:209px;
height:35px;
z-index:23;
}
#apDiv20 {
position:absolute;
left:851px;
top:5443px;
width:142px;
height:45px;
z-index:24;
}
#apDiv21 {
position:absolute;
left:698px;
top:4240px;
width:207px;
height:55px;
z-index:25;
}
#apDiv22 {
position:absolute;
left:756px;
top:3187px;
width:140px;
height:54px;
z-index:26;
}
#apDiv23 {
position:absolute;
left:384px;
top:5487px;
width:42px;
height:48px;
z-index:27;
}
#apDiv24 {
position:absolute;
left:714px;
top:2665px;
width:59px;
height:20px;
z-index:28;
}
#apDiv25 {
position:absolute;
left:45px;
top:3975px;
width:83px;
height:16px;
z-index:29;
}
#apDiv26 {
position:absolute;
left:71px;
top:814px;
width:49px;
height:17px;
z-index:30;
}
#apDiv27 {
position:absolute;
left:415px;
top:2402px;
width:64px;
height:56px;
z-index:31;
}
#apDiv28 {
position:absolute;
left:592px;
top:2503px;
width:458px;
height:51px;
z-index:32;
}
#apDiv29 {
position:absolute;
left:618px;
top:2571px;
width:113px;
height:36px;
z-index:33;
}
#apDiv30 {
position:absolute;
left:375px;
top:2405px;
width:23px;
height:25px;
z-index:34;
}
.style12 {color: #FFFFFF}
.style13 {
font-family: "Times New Roman", Times, serif;
color: #FFFFFF;
font-size: 24px;
font-weight: bold;
}
#apDiv31 {
position:absolute;
left:26px;
top:1483px;
width:66px;
height:74px;
z-index:35;
}
#apDiv32 {
position:absolute;
left:168px;
top:1614px;
width:273px;
height:53px;
z-index:36;
}
#apDiv33 {
position:absolute;
left:395px;
top:648px;
width:30px;
height:41px;
z-index:37;
}
#apDiv34 {
position:absolute;
left:29px;
top:1482px;
width:21px;
height:22px;
z-index:38;
}
#apDiv35 {
position:absolute;
left:442px;
top:644px;
width:22px;
height:23px;
z-index:39;
}
#apDiv36 {
position:absolute;
left:854px;
top:1412px;
width:122px;
height:38px;
z-index:40;
}
#apDiv37 {
position:absolute;
left:247px;
top:1709px;
width:38px;
height:28px;
z-index:41;
}
#apDiv38 {
position:absolute;
left:48px;
top:-6px;
width:19px;
height:15px;
z-index:42;
}
#apDiv39 {
position:absolute;
left:361px;
top:5833px;
width:29px;
height:25px;
z-index:43;
}
#apDiv40 {
position:absolute;
left:13px;
top:5828px;
width:24px;
height:23px;
z-index:44;
}
-->
</style>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>

<body>
<div id="apDiv1"><img src="billeder/index.jpg" alt="SOL is Emil Brahe" width="682" height="478" border="0" /></div>
<div id="apDiv4"><img src="billeder/top.JPG" width="1012" height="182" alt="The Official SOL Site" longdesc="http://www.solarmassacre.dk" /></div>
<div id="apDiv5"><img src="news131008.gif" alt="news 10 13 08" width="535" height="591" /></div>
<div id="apDiv6"><img src="billeder/ltbamlyric1.GIF" alt="Let there be a massacre lyrics 1" width="596" height="1062" /></div>
<div id="apDiv7"><img src="billeder/ltbamlyric2.gif" alt="Let there be a massacre lyrics 2" width="678" height="1180" /></div>
<div id="apDiv8"><img src="billeder/ltbam.jpg" alt="Let There Be A Massacre" width="130" height="130" border="0" usemap="#Map5" />
<map name="Map5" id="Map5"><area shape="rect" coords="37,39,102,98" href="#oettinger" />
</map></div>
<div id="apDiv9"><a name="ltbam" id="ltbam"></a></div>
<div id="apDiv11"><img src="billeder/ltbamtracklist.gif" alt="Let There Be A Massacre Track List" width="325" height="461" /></div>
<div class="style1" id="apDiv12">
<p><img src="billeder/content.gif" alt="The Official Sol Site" width="289" height="465" border="0" usemap="#Map" />
<map name="Map" id="Map">
<area shape="rect" coords="68,103,227,125" href="#news101308" />
<area shape="rect" coords="22,270,266,292" href="#ltbamlyrics" />
<area shape="rect" coords="22,343,263,364" href="#ltbam" /><area shape="rect" coords="69,80,225,103" href="#news101508" alt="news 10 15 08" /><area shape="rect" coords="61,174,228,194" href="#viljentilkamp" alt="Viljen Til Kamp" />
<area shape="rect" coords="92,390,197,420" href="#con" />
<area shape="rect" coords="68,194,224,220" href="#abyss" />
</map></p>
</div>
<div id="apDiv14"><a name="news101308" id="news101308"></a></div>
<div id="apDiv15"><a name="ltbamlyrics" id="ltbamlyrics"></a></div>
<div id="apDiv16"><img src="billeder/tothetop.gif" alt="to the top" width="100" height="25" border="0" usemap="#Map2" />
<map name="Map2" id="Map2"><area shape="rect" coords="-4,-6,141,24" href="#front" />
</map></div>
<div id="apDiv17"><a name="front" id="front"></a></div>
<div id="apDiv18"><img src="billeder/contact.gif" alt="contact" width="590" height="473" /></div>
<div id="apDiv19">
<map name="Map2Map" id="Map2Map">
<area shape="rect" coords="-4,-6,141,24" href="#front" />
</map>
<map name="Map2Map2" id="Map2Map2">
<area shape="rect" coords="-4,-6,141,24" href="#front" />
</map>
<img src="billeder/tothetop.gif" alt="to the top" width="100" height="25" border="0" usemap="#Map2Map3" />
<map name="Map2Map3" id="Map2Map3">
<area shape="rect" coords="-14,-4,131,26" href="#front" />
</map>
</div>
<div id="apDiv20"><img src="billeder/tothetop.gif" alt="to the top" width="100" height="25" border="0" usemap="#Map2Map4" />
<map name="Map2Map4" id="Map2Map4">
<area shape="rect" coords="-4,-6,141,24" href="#front" />
</map>
</div>
<div id="apDiv21"><img src="billeder/tothetop.gif" alt="to the top" width="100" height="25" border="0" usemap="#Map2Map5" />
<map name="Map2Map5" id="Map2Map5">
<area shape="rect" coords="-4,-6,141,24" href="#front" />
</map>
</div>
<div id="apDiv22"><img src="billeder/tothetop.gif" alt="to the top" width="100" height="25" border="0" usemap="#Map2Map6" />
<map name="Map2Map6" id="Map2Map6">
<area shape="rect" coords="-4,-6,141,24" href="#front" />
</map>
</div>
<div id="apDiv23"><img src="billeder/Sol1.gif" alt="Emil Brahe Smoking" width="618" height="339" /></div>
<div id="apDiv27"><img src="billeder/musik/iabys.JPG" alt="Abyss Of Light" width="573" height="159" /></div>
<div class="style12" id="apDiv28"><img src="billeder/musik/play.GIF" alt="Play Abyss Of Light" width="206" height="28" border="0" usemap="#Map4" />
<map name="Map4" id="Map4"><area shape="rect" coords="3,-39,229,23" href="musik/abyss.html" target="_blank" alt="Play Abyss Of Light" />
</map> </div>
<div id="apDiv29"><img src="billeder/tothetop.gif" alt="to the top" width="100" height="25" border="0" usemap="#Map2Map10" />
<map name="Map2Map10" id="Map2Map10">
<area shape="rect" coords="-4,-6,141,24" href="#front" />
</map>
</div>
<div id="apDiv30"><a name="abyss" id="abyss"></a></div>
<div id="apDiv31"><img src="billeder/musik/iviljen.JPG" alt="viljen til kamp" width="559" height="206" /></div>
<div id="apDiv32"><img src="billeder/musik/play.GIF" alt="Play Viljen til kamp" width="206" height="28" border="0" usemap="#Map3" />
<map name="Map3" id="Map3"><area shape="rect" coords="3,-40,253,23" href="musik/viljen.html" target="_blank" alt="Play Viljen Til Kamp" />
</map> </div>
<div id="apDiv33"><img src="news101508.JPG" alt="news 10 15 08" width="636" height="813" /></div>
<div id="apDiv34"><a name="viljentilkamp" id="viljentilkamp"></a></div>
<div id="apDiv35"><a name="news101508" id="news101508"></a></div>
<div id="apDiv36"><img src="billeder/tothetop.gif" alt="to the top" width="100" height="25" border="0" usemap="#Map2Map7" />
<map name="Map2Map7" id="Map2Map7">
<area shape="rect" coords="-4,-6,141,24" href="#front" />
</map>
</div>
<div id="apDiv37"><img src="billeder/tothetop.gif" alt="to the top" width="100" height="25" border="0" usemap="#Map2Map8" />
<map name="Map2Map8" id="Map2Map8">
<area shape="rect" coords="-4,-6,141,24" href="#front" />
</map>
</div>
<div id="apDiv40"><a name="con" id="con"></a></div>
<div align="left"></div>
</body>
</html>

angelwatt
Oct 15, 2008, 11:33 AM
First, this probably should have been started as a new thread considering the original is from 2005. Second, go back and edit your post and put the HTML block around your code so it formats correctly (place "[ HTML ] YOUR HTML [ /HTML]" without the spaces).

I tried the site with Safari 3 and had no problems with the links. What version are you trying?

oettinger
Oct 16, 2008, 12:13 PM
First, this probably should have been started as a new thread considering the original is from 2005. Second, go back and edit your post and put the HTML block around your code so it formats correctly (place "[ HTML ] YOUR HTML [ /HTML]" without the spaces).

I tried the site with Safari 3 and had no problems with the links. What version are you trying?

well. i have nothing against the year 2005, even though it was a bad movie year. im using safari 3.1.2.
the links are "working" but not taking you the right places. for instance "to the top" should take you to the top.
Have no idea how to format the html the right way.

oettinger
Oct 16, 2008, 01:33 PM
hi fixed it myself. i will post what i did and what was wrong tomorrow

SrWebDeveloper
Oct 16, 2008, 02:35 PM
Man, this is old stuff.

Anyway, I welcome you to post your fix but I want to comment on the actual syntax requirements for named anchors by W3C standards.

1) The name attribute is cross browser compliant for DTD types HTML and transitional XHTML. ID should not be used because if DTD is HTML the ID will be ignored. In transitional XHTML the ID is technically in draft/unsupported status so it likely will work in most browsers, but you can't count on it!

If you assign the same value for ID and name with those DTDs be warned - some browsers will either ignore it or cause a conflict with existing properties in the document object.

2) The ID attribute is required in strict HTML. As a matter of fact, the name attribute is officially deprecated. So only use the ID in strict HTML, period.

Source: http://www.w3schools.com/TAGS/att_a_name.asp

-jim