Question

So I've received this project to improve a webpage and it has a weird behaviour. When the resolution is smaller than 900px (small laptops and tablets) and you get to the end of the page you can scroll down endlessly after the footer image (it appears the background image repeating itself). This also happens with all resolutions when I have firebug opened. All divs are properly closed. I really don't know what is behind this behaviour. Maybe someone saw it before...

Here's my footer:

<footer>

 <div id="footer">

  <div id="footerContainer">

   <div id="footerMain">

    <div id="legal"></div>

    <div id="footerNav">

      <img src="images/table-footer.png" alt="">

     </div>

    </div>

   </div>

 </div>

</footer>

<a href="#" id="toTop"></a>
</body>

</html>
Was it helpful?

Solution

The #toTop anchor is being pushed down below the bottom of the viewport when the screen height is below a certain number. This is because whatever script is being used changes the top value of that anchor to be x amount more than the scrolled position. A better way to accomplish this same effect would be to make the bottom value of the guy be something like 10 more than the bottom of the viewport. Then he won't go down too far and cause the browser to think there's more space than there is.

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