I know this may turn out to be a common mistake and make me look stupid, but it's been two days now and i can't get over it:
I have a simple html page, with some tags and a footer.
<body>
<!-- many tags and stuff -->
<footer>
<!-- stuff in here too -->
</footer>
</body>
My css looks like this:
footer {
position: absolute;
bottom: 0;
width: 100%;
height: 25vh;
}
The problem is that when i load the page this leaves a gap in the end, after the footer. How can i make it stick to the bottom?
If i inspect the page i can see that the gap is not caused by any margin or padding property of the footer or of the body, but the gap itself is part of the body, and i can't figure out why it's there.
Things i tried:
Make it relative to a parent, or even fixed or sticky, obviously didn't work;
Use transform: translate(), but that's not very elegant nor effective
Disclaimer:
The footer comes from a JQuery function that injects the code from another html file, as suggested here, but i believe that shouldn't matter.
HERE IS A CODEPEN THAT SHOWS THE PROBLEM
Any ideas? Thank you
Edit:
I think i am ready to give up and follow this idea, the problem persists though.