Footer is not fixed at the bottom (tried most of the answers in stack overflow) : The footer is not fixed at the bottom when the contents of the page are less than the window height. Tried many methods. Nothing seems to work. Below is the screenshot.Please help.

contents more than window size:[![][1]][1]


contents less than window height:

[![enter image description here][2]][2]


  [1]: https://i.stack.imgur.com/Num3i.png
  [2]: https://i.stack.imgur.com/s5eoh.png