8
I have a page on which there’s a div
with various contents inside, which are modified according to the user’s wish. Below there is another div
who is the Footer.
In case I put one position: relative
, the footer will adjust its position according to the size of the page, but it does not get "stuck" at the bottom (with no space at the bottom of the page) when the browser window is resized to a smaller size.
Already if I put one position: absolute
, the footer will stay fixed at the bottom of the page, but will not fit the window size.
But I’d like to fix one bottom: 0px
, similar to what happens if I apply a position: absolute
, but so that if the page content is larger, the footer does not overlap the page.
Does anyone know how it would be possible to do that?
My example is here at Jsfiddle.
If I really understand your problem, I think this will solve, at least it will eliminate the gap between the footer and the page edge:
*{margin: 0;}
. Place at the beginning of your css, this will interfere with all elements of your page where themargin
is not specified.– leandroungari
If you have already solved please mark as solved
– Otto