Search code examples
csshtmlfootersticky-footer

making a div stick at the bottom on container div show/hide toggle?


my main container div can be refreshed, so its content is being hide/shown. When my container div is hide, my footer shoots up.

the html structure looks like the following:

Note that i already tried this:

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

Nor can i set a height on the container div because i want the content div height to stretch 100%.

Any ideas? Thanks in advance.


Solution

  • Sticky footer is excellent for keeping the footer where it should be.