I have a footer tag (after a body tag inside main tag):
footer {
text-align: center;
position: fixed;
width: 100%;
background-color: #d9efef;
height: auto;
bottom: 0;
}
<body>
<main>
short html content
</main>
</body>
<footer>
<p>
Some Text (large amount)
</p>
</footer>
On a desktop it's relatively nicely styled (even though it's fixed and not after content). On mobile though, it becomes very tall and is annoying to constantly have on the bottom of the screen.
How can I make the footer stay below the content at all times, but also stay at the bottom of the screen when the page content is short?
(The stackoverflow.com footer is kind of what I'm thinking about)