I'm having an issue with keeping the footer pinned to the bottom of the page. I haven't applied any specific styles to the footer, just placed it at the end of the content. Everything looks great until there's a page with minimal content, causing the footer to move up like in this image: https://i.stack.imgur.com/fuC37.png
How can I ensure that the footer stays at the bottom even when the content height is small?
I've tried adding these styles to the footer:
footer{
position: fixed;
bottom: 0; }
This approach works for pages with minimal content, but on pages with more content, the footer ends up overlapping with the main content like in this image: https://i.stack.imgur.com/u81Zs.png
In conclusion, how can I make sure that the footer remains at the bottom of the page regardless of content height?