This css work in both casefooterbottom

1. content height is less than window height
2. content height is more than window height

TRY IT NOW

You can also check out another method at  Responsive, flexible-height sticky footer in css.