PDA

View Full Version : <div><a name> Problems in Safari




slooksterPSV
Nov 5, 2005, 04:51 PM
I've setup a <div> area that is setup on Auto for scrolling options. If I have <a name="top"></a> and a ways down the div have a link back to <a href="#top">TOP</a> it does nothing. Firefox works, Internet Explorer works, but Safari does not for this. I've tried changing name to #top, I've tried taking out the </a> on <a name> I tried a lot of things, but nothing has worked. Anyone have this problem?

BTW this is in a PHP Page that loads a page into the <div> box that has the <a name> thing in it. I'll post the code if you need it.



rendezvouscp
Nov 5, 2005, 06:45 PM
You should use <a id="top></a> for that anchor. While "name" is still part of the spec, later versions of XHTML will be getting rid of the "name" attribute. I'm unsure why it doesn't work in Safari (perhaps a conflict with another id?) but try using "id" and see if that works.
-Chase

Mitthrawnuruodo
Nov 5, 2005, 07:39 PM
...or to be sure it works in most browsers at the moment use:

<a name="top" id="top"></a>

:)

slooksterPSV
Nov 5, 2005, 11:32 PM
Nope ID didn't work either. I have it setup like this
<a name="top" id="top"></a>




text

whatever else

<a href="#top">TOP</a>

mnkeybsness
Nov 6, 2005, 12:51 PM
Safari doesn't have full support for embedded scrolling layers. It just won't work in Safari unless you get crafty with some Javascript.

sorry.

obelix
Nov 9, 2005, 11:04 AM
Actually you can accomplish this through Javascript. Take a look here:

http://blog.deconcept.com/code/overflowsafari/overflowsafari.html

It took me a while to get it working thanks to my JS stupidity but it does work.