Old 11-03-2004, 11:07   #1 (permalink)
JiRaffe
Ur mother's ur brother?
 
JiRaffe's Avatar
 
Join Date: Jun 2003
Location: Liverpool
Posts: 880
another DIV problem

I have a scrolling Div as part of a page and since the text in that box is quite significant, i was hoping to put some anchor links at the top of the box.

I've googled for this and the general consensus is that if you just use normal anchor links within the DIV it should work, or even if you use DIV id's it should work, but no matter how i try it, i just can't get then damned thing to work.

For the destination i've tried

<a name="equity"></a>

and for the link i've put

<a href="#equity">Go to Equity</a>

anyone got any ideas where I'm going wrong?
__________________
::: TC Magazine :::
  Reply With Quote
Old 11-03-2004, 11:15   #2 (permalink)
smallbeer
I Ain't Losing Any Sleep™
 
Join Date: Apr 2003
Posts: 5,200
It works for me. Show us yer code.
__________________
That's fuckin' ingenious, if I understand it correctly. It's a Swiss fuckin' watch.
  Reply With Quote
Old 11-03-2004, 11:16   #3 (permalink)
Bill Posters
trouble free and loverlee
 
Join Date: Mar 2003
Location: YooKay
Posts: 2,933
The general consensus is wrong.
This is one of those things that each browser handles differently.
I think the most accomodating for this technique is MSIE, but it's been a while since I tested it so don't quote me.

You might need to *ahem* revert to iframes if this functionality is critical.
  Reply With Quote
Old 11-03-2004, 11:34   #4 (permalink)
JiRaffe
Ur mother's ur brother?
 
JiRaffe's Avatar
 
Join Date: Jun 2003
Location: Liverpool
Posts: 880
http://www.thundermedia.co.uk/oconno...gstrategy.html

ok, so here is the page i'm playing around with. the less mention of tables the better. as you can see, there is the word "top" at the top of the div. the link at the bottom of the div is meant to jump it back up there. but it doesn't. doh

cheers for any advice. any having taking some time to choose Div's over iFrames, it would be sod's law if i had to go back to them
__________________
::: TC Magazine :::
  Reply With Quote
Old 11-03-2004, 11:41   #5 (permalink)
smallbeer
I Ain't Losing Any Sleep™
 
Join Date: Apr 2003
Posts: 5,200
Bill's right. I tried it in IE and Mozi and it worked fine. Googled and found this though...

Quote:
In IE6/Win and Mozilla a link to such an anchor makes the element with scrollbar to scroll so that the concerned anchor is visible at the top of the area. But in other browsers (IE/Mac, Safari, Opera 6 and 7/Win) this doesn't happen (moreover IE/Mac does strange things.) I checked this in a simple test page.
__________________
That's fuckin' ingenious, if I understand it correctly. It's a Swiss fuckin' watch.
  Reply With Quote
Old 11-03-2004, 11:44   #6 (permalink)
JiRaffe
Ur mother's ur brother?
 
JiRaffe's Avatar
 
Join Date: Jun 2003
Location: Liverpool
Posts: 880
ahhh, that would explain it because i tried it in Safari and IE on the mac. i'll go check it on the pc now.

looks like i may be stuck with iFrames then
__________________
::: TC Magazine :::
  Reply With Quote
Old 11-03-2004, 11:56   #7 (permalink)
JiRaffe
Ur mother's ur brother?
 
JiRaffe's Avatar
 
Join Date: Jun 2003
Location: Liverpool
Posts: 880
yeah it works on IE on the pc. it does a funny little jump of the whole window when you do it but other than that it works. i checked it on IE on the mac and it doesn't work but for some reason the browser 'imagines' that the whole content of the DIV is visible and jumps all the way down to where it would be if the DIV wasn't scrollable. did that make sense?

should i bother catering for people with IE on the mac? i'm tempted not to. cos although it doesn't actually work in Safari at least it doesn't screw up.
__________________
::: TC Magazine :::
  Reply With Quote
Old 12-03-2004, 06:06   #8 (permalink)
JiRaffe
Ur mother's ur brother?
 
JiRaffe's Avatar
 
Join Date: Jun 2003
Location: Liverpool
Posts: 880
right i've set up an example with iFrames now...

http://www.thundermedia.co.uk/oconno...strategy2.html

I've tested it and so far I can tell that it work on IE mac/pc, and safari. But it didnt work in opera when i tried it on the mac.

if anyone has a different browser could you let me know if it works?

i'm still pondering whether to have a Div where you can't use anchors or iFrames which don't work sometimes.

hmmm..... any opinions?

thanks!

EDIT: just checked it again in Opera and it was actually the Div which didn't work and the iFrame which did. Doh! timmay
__________________
::: TC Magazine :::
  Reply With Quote
Old 13-03-2004, 06:07   #9 (permalink)
cam
vague™
 
cam's Avatar
 
Join Date: Mar 2004
Location: Glasgow
Posts: 5,513
From a purely personal, not at all well thought out, point of view - i loathe iframes.

But.. it displays fine in Firefox too
__________________
  Reply With Quote
Old 14-03-2004, 05:57   #10 (permalink)
JiRaffe
Ur mother's ur brother?
 
JiRaffe's Avatar
 
Join Date: Jun 2003
Location: Liverpool
Posts: 880
from a purely personal point of view, i loathe frames as well. but for some reason, the client really wants to have scrolling text within the website. cheers for the info on Firefox, much appreciated!
__________________
::: TC Magazine :::
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8