|
|
| Welcome to the Mac Forums forums. Please read the FAQ if you have questions. Register to participate. |
|
|||||||
| TouchArcade.com - iPhone Game Reviews and News |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
|
macrumors member
Join Date: Aug 2005
|
"Named Anchor" Hack/Workaround for Safari??
Does anybody know of a work around for "named anchors" in Safari? Safari is the only browser where this (named anchors) does not work.
__________________
1.67GHz 15" PowerBook w/SuperDrive |
|
|
|
|
|
#2 |
|
macrumors Demi-God
Join Date: Dec 2002
Location: the good life
|
As far as I know there is no problem...I just made a quick page with the following code and it worked perfectly.
Code:
<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>
__________________
puisqu'on est jeune et con, puisqu'ils sont vieux et fous. . . Last edited by OutThere : Dec 15, 2005 at 02:07 PM. |
|
|
|
|
|
#3 | |
|
Thread Starter
macrumors member
Join Date: Aug 2005
|
Quote:
__________________
1.67GHz 15" PowerBook w/SuperDrive |
|
|
|
|
|
|
#4 |
|
macrumors Demi-God
Join Date: Dec 2002
Location: the good life
|
Fixed
__________________
puisqu'on est jeune et con, puisqu'ils sont vieux et fous. . . |
|
|
|
|
|
#5 | |
|
Thread Starter
macrumors member
Join Date: Aug 2005
|
Quote:
__________________
1.67GHz 15" PowerBook w/SuperDrive |
|
|
|
|
|
|
#6 |
|
macrumors member
Join Date: Jul 2002
|
Worked for me
|
|
|
|
| encephalon |
| View Public Profile |
| Find More Posts by encephalon |
|
|
#7 |
|
macrumors regular
Join Date: May 2005
|
check a list apart or boxes and arrows
! $
__________________
Mac Pro 8core (2.8 QC x2) 2gig / 1 TB WD Caviar Black / ATI HD 2600 256mb / 3GS Iphone Black 32GB |
|
|
|
|
|
#8 |
|
Contributor
Join Date: Oct 2004
Location: On the Left Coast - Victoria BC Canada
|
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.
__________________
Expert
Ex = former, no longer. Spurt = a leak, esp. when caused by water pressure. Expert = a has-been drip under pressure. |
|
|
|
|
|
#9 | |
|
Thread Starter
macrumors member
Join Date: Aug 2005
|
Quote:
link removed temporarily
__________________
1.67GHz 15" PowerBook w/SuperDrive Last edited by DesignIt : Dec 16, 2005 at 11:01 AM. |
|
|
|
|
|
|
#10 | |
|
Contributor
Join Date: Oct 2004
Location: On the Left Coast - Victoria BC Canada
|
Quote:
You can combine the two, for backwards compatibilty <a id="anchorname" name="anchorname" /> http://www.jimthatcher.com/skipnav.htm
__________________
Expert
Ex = former, no longer. Spurt = a leak, esp. when caused by water pressure. Expert = a has-been drip under pressure. |
|
|
|
|
|
|
#11 | |
|
macrumors Demi-God
Join Date: Dec 2002
Location: the good life
|
Quote:
__________________
puisqu'on est jeune et con, puisqu'ils sont vieux et fous. . . |
|
|
|
|
|
|
#12 | |
|
Thread Starter
macrumors member
Join Date: Aug 2005
|
Quote:
__________________
1.67GHz 15" PowerBook w/SuperDrive |
|
|
|
|
|
|
#13 |
|
macrumors 6502a
|
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:
Code:
<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> |
|
|
|
|
|
#14 | |
|
Contributor
Join Date: Oct 2004
Location: On the Left Coast - Victoria BC Canada
|
Quote:
__________________
Expert
Ex = former, no longer. Spurt = a leak, esp. when caused by water pressure. Expert = a has-been drip under pressure. |
|
|
|
|
|
|
#15 | |
|
Thread Starter
macrumors member
Join Date: Aug 2005
|
Quote:
Thanks again! =)
__________________
1.67GHz 15" PowerBook w/SuperDrive |
|
|
|
|
|
|
#16 | |
|
Thread Starter
macrumors member
Join Date: Aug 2005
|
Quote:
__________________
1.67GHz 15" PowerBook w/SuperDrive |
|
|
|
|
|
|
#17 |
|
macrumors 6502a
|
I just saw it once, at the top so I assumed there's a chance there might be more:
Code:
<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> Code:
<ul id="skiplist"> <li><a href="#cont">Skip Navigation.</a></li> <li><a href="#side">Jump to Side Bar.</a></li> </ul> #skiplist li{} #skiplist li a{} No need to add classes and IDs to the li and a tags. |
|
|
|
|
|
#18 | |
|
Thread Starter
macrumors member
Join Date: Aug 2005
|
Quote:
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. I'm not too terribly concerned about those, as they aren't what's causing the "anchors" to not work. Thanks for your tips!
__________________
1.67GHz 15" PowerBook w/SuperDrive |
|
|
|
|
|
|
#19 | |
|
macrumors 6502a
|
Quote:
http://validator.w3.org/check?uri=ht...%2Fskipnav.htm |
|
|
|
|
|
|
#20 |
|
macrumors newbie
Join Date: Dec 2005
|
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 |
|
|
|
|
|
#21 | |
|
macrumors 68000
|
Quote:
![]() -Chase |
|
|
|
|
|
|
#22 | |
|
macrumors 6502a
|
Quote:
|
|
|
|
|
|
|
#23 | |
|
Thread Starter
macrumors member
Join Date: Aug 2005
|
Quote:
Also, even with the image in the correct location (ie-page validated), the name anchor still doesn't work in Safari.
__________________
1.67GHz 15" PowerBook w/SuperDrive |
|
|
|
|
|
|
#24 | |
|
macrumors 6502a
|
Quote:
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.
|
|
|
|
|
|
|
#25 | |
|
Thread Starter
macrumors member
Join Date: Aug 2005
|
Quote:
![]() edit: I am using this version of Safari: 1.3.1 (v312.3.3)
__________________
1.67GHz 15" PowerBook w/SuperDrive |
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|