OK, this sounds like really basic stuff, but I can't figure out what the problem is.
Placing the following in an shtml doc:
<p>Visit <a href="index.shtml#section2">Section 2</a> for more info.</p>
and somewhere within index.shmtl:
<a name="section2"></a>
<p>Section 2</p>
That link should load the home page so "Section 2" is at the top of the browser window, right?
Well, IE is not doing it. Instead, it is loading the page a few inches below the anchor, cutting off some of the targetted content. Mozilla does it fine, and IE seems to read this code in other webpages without trouble, but not for me.
Is there any reason why IE would be doing this?
Thanks!
Ian
IE and page anchors - what the heck?
Try this:
<a name="section2" id="section2"></a>
Antibland
Didn't work
Thanks, Antibland, but it didn't work.
This is insane, I've tried so many different methods of anchoring and IE keeps doing the same thing, and just on my website.
I
Re: Didn't work
Link please?
Here ...
I hesitated with a link because it's a political website (satire on the Republican Party). But just for an easy example, go to
http://www.republicandictionary.com/rd_a.shtml
with IE (I'm using IE 6., and click on any of the underlined links and see how IE loads the page too far down.
Thanks!
I
Re: Here ...
I hesitated with a link because it's a political website (satire on the Republican Party).
Like this: http://www.imaginekitty.com/double-column.html
That way no one is offended and no one will argue with you as this is not the place for that (there are plenty of other places like that).
I am sure the anchors would work if you address them somewhere. How are you linking to them?
What happens when you go here:
http://www.republicandictionary.com/rd_a.shtml#affirmativeaction
Signed,
The helpful republican.
I SOLVED IT!!
Sorry about the breach in protocol, Triumph, I've seen the "lorum ipsum whatever" enough to know better.
But I solved the problem - boy was it tricky.
The deal is, if you place anchors inside a div that is relatively positioned, for example -
position: relative;
top: -150px;
Then IE will go to the anchor, but it will load the page 150 pixels under the anchor!
The way I solved it was to convert the div in question to be absolute.
Thanks for the input!
Peace.