Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Archive > Archives of Old Posts > Web Design and Development (archive)

 
 
Thread Tools Search this Thread Display Modes
Old Nov 8, 2005, 04:53 PM   #1
obelix
macrumors member
 
Join Date: Oct 2004
Anchors not working in CSS layout in Safari

Well they seem to work in both IE and FIREFOX but I just can't seem to get anchors to work in Safari. Apparently this is an issue to do with CSS and the overflow property. I found some information on it here:

http://blog.deconcept.com/code/overf...lowsafari.html

However the fix doesn't seem to work for me. The page I am working on is here:

http://www.tumbara.com/demo/index2.php?action=about#c1

I've tried all sorts of things to try to get this to work but no such luck. I'm just at my wits end. Any ideas what could be happening here?

Last edited by obelix; Nov 8, 2005 at 05:35 PM.
obelix is offline   0
Old Nov 8, 2005, 05:10 PM   #2
robbieduncan
Moderator
 
robbieduncan's Avatar
 
Join Date: Jul 2002
Location: London
What exactly is not working?

Also the first link is broken.
robbieduncan is offline   0
Old Nov 8, 2005, 05:23 PM   #3
Mitthrawnuruodo
Moderator
 
Mitthrawnuruodo's Avatar
 
Join Date: Mar 2004
Location: Bergen, Norway
There was just another thread about anchors not working in Safari: http://forums.macrumors.com/showthread.php?t=159809

It's just one of the many small annoyances with Safari, like they display the "Question-mark square" whenever an image is missing, instead of displaying the contents of the alt tag, like they should...
__________________
Those who fail to learn history are doomed to repeat it; those who fail to learn history correctly... why, they are simply doomed.
Mitthrawnuruodo is offline   0
Old Nov 8, 2005, 05:35 PM   #4
obelix
Thread Starter
macrumors member
 
Join Date: Oct 2004
Sorry it looks like I posted the wrong link...

http://blog.deconcept.com/code/overf...lowsafari.html

What exactly is not working? Well the anchors aren't working. If you click the "Tumbara Project" or "Interview with Keith Baker" links you will find that they don't jump down the page like they should. If you open it in Camino or Firefox it works fine... same with IE... it just doesn't work in Firefox.

I'm just not sure how to implement what they are talking about in the blog into my code.
obelix is offline   0
Old Nov 8, 2005, 05:53 PM   #5
robbieduncan
Moderator
 
robbieduncan's Avatar
 
Join Date: Jul 2002
Location: London
Right. It's nice and simple. If you look at the source code of the JavaScript fix in the linked example it includes a JavaScript file that defines scrollDivToAnchor. I don't see that on your page.

When I click on the first link (The Tumbara Project) I see the following in the JavaScript console (turn on the Safari Debug menu):

Object (result of expression scrollDivToAnchor) does not allow calls.
http://www.tumbara.com/demo/index2.php?action=about#c1
robbieduncan is offline   0
Old Nov 8, 2005, 06:49 PM   #6
obelix
Thread Starter
macrumors member
 
Join Date: Oct 2004
K I included the Javascript and still no luck... any ideas?
http://www.tumbara.com/demo/index2.php?action=about#c2
obelix is offline   0
Old Nov 9, 2005, 02:30 AM   #7
robbieduncan
Moderator
 
robbieduncan's Avatar
 
Join Date: Jul 2002
Location: London
Quote:
Originally Posted by obelix
K I included the Javascript and still no luck... any ideas?
http://www.tumbara.com/demo/index2.php?action=about#c2
Sorry for the delay in replying, been having a nice sleep! Again it's very simple! Did you even read the JS Code? It defines a variable called targBox. In the file you are including it's set to "box". It has to be set to the id of the div that contains the anchors you want to scroll to.
robbieduncan is offline   0
Old Nov 9, 2005, 11:02 AM   #8
obelix
Thread Starter
macrumors member
 
Join Date: Oct 2004
Sorry for wasting your time Robbie, I knew that needed to go in there but I guess I neglected to add it in with the last little update. I had taken everything out of the code you see because I wanted to try some other things and then when I made this post I forgot to add a few things back in. Sorry for all the trouble... you've been most helpful .... oh and it works now! Yay!
obelix is offline   0
Old Nov 9, 2005, 04:19 PM   #9
robbieduncan
Moderator
 
robbieduncan's Avatar
 
Join Date: Jul 2002
Location: London
It's not a problem! I'm glad to here that it's all working for you now
robbieduncan is offline   0


 
MacRumors Forums > Archive > Archives of Old Posts > Web Design and Development (archive)

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Link visibility and Safari CSS nelly22 Web Design and Development 7 Dec 19, 2013 02:37 AM
Customizing extension layout in Safari? kat.hayes Mac OS X 10.7 Lion 2 Jul 15, 2013 01:08 PM
Teaching myself CSS... is not working out. Kingsly Web Design and Development 9 Jan 8, 2013 10:21 AM
New layout for Google News on iPad Safari jasg49 iPad 2 Sep 27, 2012 05:56 PM
Safari 6 layout issues leppdesign OS X 10.8 Mountain Lion 1 Aug 14, 2012 09:58 PM

Forum Jump

All times are GMT -5. The time now is 05:29 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC