v4 sticky footer example with flexbox#23143
Conversation
fix body height css sticky footer example flexb
|
Now just add |
|
Thanks @alanstratos that looks pretty good. Just to be clear, that will push down everything that comes after the Another question: do you want to submit a PR with it, in which case I could close this one, or would you like me to incorporate it into this one? Lastly it's worth mentioning IE11 has a bug that makes it incompatible with this whole approach, unless you can explicitly set a height on the |
|
Why don't you use the helper classes instead? |
|
I tried to do more or less exactly the same thing when testing out boostrap 4.0-beta now (I have a variable height footer, editors can add stuff there), both using plain css with flexbox on body and footer, and using the flex box utility classes. However both cases messes with the height of the navbar when page is bigger than screen size, seen this? |
|
Solved by #26674 so you can close this. |
In July 2017 flexbox support is at 97.48% (prefixed). In the past, the sticky footer element has relied on absolute positioning and a fixed height. The utility of a fixed height footer is limited, not to mention the unsightly mess created when the footer content expands beyond the predetermined fixed height.
With the use of flexbox, the sticky footer example CSS becomes lighter and the sticky footer element's height can be
auto.