Check out this fiddle where I am trying to create a footer that remains at the bottom of the page, similar to the screenshot provided:
However, I'm facing an issue where when the browser window is resized so that the viewport is smaller than the content area, and the page becomes scrollable, the footer ends up in the middle of the page instead of staying below the content. Once scrolling occurs, the footer aligns itself with the middle of the content boxes, as shown in another screenshot:
Is there a way to achieve a footer that sticks to the bottom of the viewport when no scrollbar is present, but then moves to the bottom of the content boxes once scrolling becomes necessary due to content extending past the viewport?
Currently, I am utilizing position:absolute; bottom:0;
on the footer. Should I be adding additional properties to my content box or footer? Any guidance would be greatly appreciated!