Incorrect Anchor Behavior?

My understanding is that when one hyperlinks to an anchor that the anchored object is placed at the top of the screen as long as there is enough space remaining on the page on which the anchor appears.

This is not the behavior I am experiencing. It seems that the anchored object, if for example it is the bottom object on the page, will be positioned so that its bottom edge is at the bottom of the screen. This is so even if there is plenty of space remaining at the below the object so that one can then scroll to place the anchored object where I expected it to be.

I was able to create a work around by placing an invisible object on the page below the anchored object, and after doing such the anchored object appeared at the top of the screen as desired.

My question then is have I misunderstood the defined behavior of an anchor?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Here’s an article about it:

http://www.w3.org/TR/html401/struct/links.html

It’s not FW related (more code oriented), but it helps understand how anchors work. Typically an anchor is like a starting point that upon usage then directs attention to a specific area. If you look in the FW5 Manual it has a whole section on anchors.

I am looking at the Screen Reference version and in Preview it starts on page 171 of 468 and if you’re looking at actual page numbers it starts on 151-174.

That should clear it up, hopefully.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Here is some specific detail regarding what I consider to be incorrect anchor behavior…

I have a page which is 6000 pixels vertical by 1028 pixels horizontal.

On that page are eight images, each image is 620 pixels wide by 428 pixels deep. The top edge of these images are placed vertically on the page at 500, 1000, 1500 … 3000, 3500 and 4000 pixels.

Immediately above each of the eight images is a small transparent graphic which is 50 by 50 pixels in size. These eight small images are placed vertically on the page at 450, 950, 1450 … 2950, 3450, and 3950 pixels.

Each of the above small images are associated with an anchor, the anchor being hyperlinked to from a small image at the top of the displayed page. The intent is that when one clicks on a small image the position of the page is changed so that the associated anchor is now at the top of the page and the associated image for that anchor is now 50 pixels from the top of the page as displayed.

The oddity is that even though the page itself is 6000 pixels deep and the last of the images is 4000 pixels down, hyperlinking to that last image will not position it at the top of the page. The “cure” I found was to place a large 1500 pixel deep transparent image positioned at 4500 pixels down on the page.

It seems to me, unless I am misunderstanding something about anchors, that there should be no need for that large transparent image at the bottom.

But I’m always open to learning! :slight_smile:


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

James said:

the page itself is 6000 pixels deep and the last of the images is 4000 pixels down

The height of the page I don’t think is relevant - what appears to matter is that there is ‘content’ on the page far enough down so that the space between the Anchor and the bottom of the browser window is the same or less than the distance between the anchor and the last ‘content’ on your page.

So if you placed a 1px trans gif at the bottom (or far enough down) it would work.

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Delta Dave,

Replacing my large transparent object at the bottom of the page with a small one as you suggested also worked.

But I’m still thinking that it should not be necessary to do such if there is sufficient space on the page itself.

Thanks for the comments!


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

But sufficient space on the page does not mean content.

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

On 6 Aug 2009, 11:46 pm, DeltaDave wrote:

But sufficient space on the page does not mean content.


My feeling is that if there is sufficient space on the page so that I can scroll to place an object at the top of the page that I ought to be able to place the same object at the top of the page with a linked to anchor–that needing to have a “dummy” object lower on the page should not be necessary. But given that I can achieve the effect I want with the dummy object makes this not an overwhelming issue.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options