I have a problem attaching a footer to the bottom of the viewport. I try different approaches, read the footer topics here, read the stickyfooter site, try and no luck, too much Google, so the problem code that I cut can be checked on my site: https://jsfiddle.net/26hf8sh2/
structure
<html> <body> <root> <header> ... </header> <main> ... </main> <footer> ... </footer> </root> </body> </html>
I want to expand the main block to fit the footer if there is not a lot of content, and stick to the footer to the bottom of the viewport if the content is low again when I try to abstract with the absolute positioning of the footer when resizing the browser. Also, if I try something like minimum heights or so, then where there is a lot of content, the footer seems to overlap the content and position it at the bottom, not the bottom of the page. So now I just add a minimum height of 800px and relative positioning. Therefore, if the screen resolution is about 1200 pixels in height, then it looks fine, but when I open it on my mobile device or change the mode to full screen, I see a gap at the bottom. I am trying to encode my site so that you can see the problem, for example, on the page protasov.by/contacts
What am I doing wrong?
Thanks in advance!
source share