Making a div stick at the bottom of the container show / hide toggle div?

my main div container can be updated, so its contents are hidden / displayed. When my container div is hidden, my footer rises.

The html structure is as follows:

Please note that I have already tried this:

And it doesn't seem to work, the footer will still fire when the div container is hidden.

Also, I canโ€™t set the height in the container div, because I want the height of the content div to be stretched 100%.

Any ideas? Thanks in advance.

+4
source share
2 answers

The sticky footer is great for storing the footer where it should be.

+1
source

Use this css:

#yourdiv { position:fixed; bottom:0; } 

This will make him sink to the end :)

+8
source

Source: https://habr.com/ru/post/1308755/


All Articles