I have a page where there is a div
with multiple contents inside, which change according to the user's desire. Below is another div
which is the Footer.
If I put a position: relative
, the footer will adjust its position according to the page size, but it does not get "stuck" down (with no space to the bottom of the page) when the browser window is resized to a smaller size.
Now if I put a position: absolute
, the footer will be fixed at the bottom of the page, but will not fit the window size.
But I would like to set a bottom: 0px
, similar to what happens if I apply a position: absolute
, but so that if the content of the page is larger, the footer does not overlap the page.
Does anyone know how it would be possible to do this?
My example is here in JsFiddle .