With JavaScript you can check if a DOM element is in the viewport, see this question for example code: https://stackoverflow.com/questions/123999/how-to-tell-if-a-dom-element-is-visible-in-the-current-viewportthis question
Now for example code.
Now if we add this isElementInViewport()
JavaScript function to our application under test we can call it from Selenium with the JavaScriptExecutor and check its return value.