Target To Top Inside Scrolling Div?
I'm working on a re-design of a site and on some pages with long lists I'm using a div set to auto overflow.
At the bottom I have the normal link to jump back to the top of the page....only it doesn't!
I know it's got something to do with the scrolling div, but I don't know what to do about it!
XHTML Transitional and CSS both validate.
Will this just not work?
My top target is placed just below the body tag:
My content is placed inside a div:
Content...yadda...yadda...
I have the link for back to the top in a div:
So I have this:
Content...yadda...yadda...
CSS for scrolling div:
.boxscroll {
border: double #C1C1C1;
padding: 18px;
height: 265px;
overflow: auto;
}
Roo
Roo posted this at 08:49 — 26th March 2006.
She has: 840 posts
Joined: Apr 1999
The strange thing is that I'm using other targets on the page to jump to specific sections and that works fine. But the target to jump the thing back to the top of the page just doesn't budge!
Roo
Busy posted this at 10:15 — 26th March 2006.
He has: 6,151 posts
Joined: May 2001
Tried using a different word?
I remember I had this problem a while back, wasn't within a scrolling div but just wouldn't jump. *trying to think what the problem was*, I know of the things I ended up doing was changing top to topp
A couple of things to try (while I try remember what my problem was)
change the name
put the anchor in a empty div tag:
remove the id from the anchor tag
Renegade posted this at 18:38 — 26th March 2006.
He has: 3,022 posts
Joined: Oct 2002
I'm not entirely sure you can "jump" to different places in a scrollable DIV as it isn't actually a seperate page like an iframe.
Roo posted this at 20:34 — 26th March 2006.
She has: 840 posts
Joined: Apr 1999
Yeah I tied a different word..no go. Renegade the strange thing is that I can jump sections of content within that div, but it won't jump back to the top of the page. Later when I have time I'll try putting the link outside of that div and see what happens.
Roo
dk01 posted this at 05:02 — 27th March 2006.
He has: 516 posts
Joined: Mar 2002
I know this works. Any way to post your complete code/site so we can look at it.
The Ape posted this at 12:59 — 2nd April 2006.
He has: 26 posts
Joined: Apr 2006
I have made this work just fine by wrapping the "top target" tags around nothing...
<a id="top"></a>
'Link to target...
<a href="#top">back to top</a>
'Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.