On my webpage, I have a footer that is not fixed in place. Currently, the page's content does not require scrolling, and the footer occupies about 25% of the browser window at full screen on a 1920 x 1080 display. The footer's contents are aligned to the top of the footer while the rest of the footer remains empty but filled with the footer's color.
The setup is very similar to this example (although my page is not created on Wix):
My ideal scenario would be for the empty space in the footer to shrink as the page's content grows, instead of increasing the scrolling distance. I would like it to stop shrinking once it reaches a minimum height, at which point the scrolling distance would start to increase.
My question is:
- Is this achievable with standard CSS?
- If not, is there an existing JS library (such as jQuery) that could help achieve this effect?
- If not, what would be the best approach to manually writing the necessary JavaScript?
Thank you.