'Loaded content is pushing element from viewport

I have one issue with pushing element from viewport when data is loaded. I have anchor link to some element on the page, and when I click on link page will be scroll down to that element, but in the meantime data comes from the server and push out that element from the viewport.

I want to stay on that element when data is loaded. Min-height or max-height is not acceptable because I don't know what I will get as a content.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source