VSD anchor/link html - Post ID 211041

User 17773 Photo


Registered User
1 post

I have set up a top anchor and link on the 'about' page. It works in IE but does not in Chrome or Firefox. Is there anything I can do?

biggdreams.coffeecup.com

Thanks.
User 1948478 Photo


Senior Advisor
1,850 posts

There is a discussion about this kind of problem in this thread:

http://www.coffeecup.com/forums/designe … le-chrome/

Still no definite, generic 'solution' there as far as I can see, but some case-by-case insights...
User 1948478 Photo


Senior Advisor
1,850 posts

Since I have seen this problem pop up occasionally since as far back as 2009, I decided to take a closer look in an attempt to come up with a generic approach that always should work. This is what i came up with:

The problem originates with the positioning of the anchor by this (VSD-generated) combination of CSS and HTML:

div.Object4696 { position:absolute; top:13px; left:947px; width:52px; z-index:19; }
....
<div class="Object4696"><a name="top"></a></div>
....


The page anchor, which should be a well-defined point in 2-dimensional space, becomes ill-defined when coded as a block element (<div></div>), which extends as an arbitrarily drawn rectangle on the page. Some browsers, e.g. Chrome, appears to react badly to this condition...

So instead of defining the page anchor as an arbitrarily drawn rectangle, use an HTML box with this single line of code, which defines a true point location:

<a name="top" style="position:absolute;left:0px;top:0px"></a>


This is for an anchor at the top of the page. For page anchors located elsewhere on the page, just change the "0" in "top:0px;" to the distance down from the top as needed. Keep the horizontal position at the left margin for all cases though ("left:0px;")
User 464893 Photo


Ambassador
1,611 posts

Good one Per, smart. I like position absolute, things know their place in the scheme of things. Shame people cannot be positioned the same.

Saved thanks.
The Guy from OZ


User 38401 Photo


Senior Advisor
10,951 posts

<<<<< Is glad people can't be positioned, I'd probably be in Siberia :P
User 187934 Photo


Senior Advisor
20,266 posts

Jo Ann wrote:
<<<<< Is glad people can't be positioned, I'd probably be in Siberia :P

Seems like the safest place to be at the moment.:lol:
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 38401 Photo


Senior Advisor
10,951 posts

hahaha that could very well be Eric!

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.