1
Hello, I have a problem that is disturbing for a long time, I have a page on which there is a div
which has several contents inside which are modified according to the user’s wish, below there is a 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 until the end of the page) if the height of the monitor changes. In case I put one position: absolute
the footer will stay fixed at the bottom of the page, but will not fit the window size. So I don’t know how to "merge" the two necessary settings.
My example is here.
Thank you.
You want it to get stuck when the user scrolls down?
– Slowaways
Ever tried to put
position: fixed
?– Slowaways
If what I understand, only use position:Fixed; bottom:0
– darkziul
Maybe I didn’t express myself well, I don’t wish the footer was with a
position: fixed
, yes with aposition: relative
or with aposition: absolute
, the problem lies in its primitive characteristics, in the case of theposition: relative
it will change its position (its location, not its positioncss
) according to the size of the elements that are located before it, but I can’t find a way to put abottom: 0px
similar to what happens if I apply aposition: absolute
. Does anyone know how it would be possible to do that?– Samir Braga
I swear I tried to understand, but I still can’t make it clear. You want your footer div to bottom: 0px when the content is not big enough to pop the page, and always leave below the div "page" when the content of this div burst the size of the page? Would it be like the bootstrap 3 "footer" class? Have you seen the example of bootstrap?
– Adriano Leal
@Adrianoleal, from what I saw I think you understand, but I still can’t solve.
– Samir Braga
@Samirbraga I could not continue my tests but as soon as I get put here. See that also I never did this, hahaha, but understanding your idea I will try to help. =)
– Adriano Leal