I recently encountered an issue on a page I was working on. The body had an image background set to cover the entire screen using background-size:cover
. To ensure the whole page was filled with content regardless of its size, I added html { height:100% }
.
Everything seemed to be going smoothly until I introduced a div
with
position:absolute; right:0; width:200px;
. As soon as this div started to have more content than the height of the page, a scroll bar appeared.
Scrolling down made it clear that the background image wasn't covering the entire page anymore. It was because the div exceeded 100% of the HTML height.
Now, I'm in need of a solution to address this issue. Any suggestions?