Question

I'm having a problem with IE where it doesn't scroll to a fragment (#foo on the URL) when the page loads. The anchor for the fragment is part of the base HTML, it isn't dynamic or anything. The page is pretty heavy. If I go into the location bar and hit enter, it scrolls to the anchor as expected (and as observed in other browsers). Behavior is observed on IE 7 and IE 8. Anybody run into this and have a workaround?

Was it helpful?

Solution

Have you tried delaying the scrolling action until say, the window load event instead of the DOM ready event? That way it might be more precise in shifting downwards and calculating where it needs to go.

A demo or some code would help debugging obviously.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top