Problems with anchors, ONLY IN SAFARI

S

Steve K

I'm stumped.

I had to whip up a site, and the right hand sub-links (the ones under
General Information) are anchors to other parts of that page.

http://fimp.aem.cornell.edu/food_exec/

My problem is, and this only happens in Safari on a Mac, when I click on
any of those sub-links like "Participant Checklist," or "Contact Info,"
etc. the link works and goes to the right spot, but my margin is gone. I
have a 20px left margin on that table as you can see when the page
opens. But after the anchor link is clicked that margin goes to zero.

With the margin at zero and you click on an orange triangle it takes you
to the "top." The margin comes back.

As you can see, from my use of tables, I'm not a pro yet, so be kind.

Thanks
Steve
 
A

Andy Dingley

I had to whip up a site, and the right hand sub-links (the ones under
General Information) are anchors to other parts of that page.
<a name="contactinfo" id="contactinfo"></a>

Try this instead:

<a name="contactinfo" id="contactinfo">Contact Info</a>

http://www.w3.org/TR/html4/struct/links.html#edef-A
"Note. User agents should be able to find anchors created by empty A
elements, but some fail to do so. For example, some user agents may
not find the "empty-anchor" in the following HTML fragment:"
 
S

Steve K

Andy Dingley said:

Thanks for the help. I'm still trying to figure it out.

What I noticed this morning is I don't really lose any margin like I
thought, but something else strange happens when I click the anchor
link.

The browsers horizontal scroll bar (at the bottom) automatically moves
slightly to the right when an anchored link is clicked. Therefore the
margin appears to have been lost but if I move that scroll bar back all
the way to the left the margin is, of course, still there.

Now I'm even more confused than I was yesterday.

Again, this is only in Safari.

Thanks
 
S

Steve K

I found out, thanks to a guy from comp.sys.mac, that because my graphic
at the top of the page was so wide, over 1500 pixels, the lower
horizontal scroll bars would always appear. I shrank that image down to
around 800, and set the width of the page. Now the scroll bars do not
show up on a normal monitor screen, unless you shrink it quite a bit.
Problem fixed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top