Is there a way to ensure that a div with a background remains at the bottom of the page, regardless of whether the content on the page pushes it down or not?
Currently, I am using the following code:
#bottomBar {
position: absolute;
bottom: 0;
}
The issue with this approach is that if the content on the page exceeds the viewport height, the div remains stuck floating in the middle with no connection to the bottom of the page.
Here is an example where this script doesn't work as intended. And here is an example where the script works well.