html - Sticky footer with the flexible box layout model? -
i trying implement sticky footer flexible box layout model implemented in recent versions of chrome , firefox.
given markup inside body element:
<header> header </header> <div> content </div> <footer> footer </footer>
my idea use following css:
html, body { height: 100%; } body { margin: 0; display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; } div { -webkit-flex: 1; flex: 1; } footer { background-color: yellow; }
this works fine long content less 100% of viewport height. when content becomes larger, however, chrome 28 begins paint footer on top of content. buggy behaviour (and if: how can workaround it) or css wrong?
you can test chrome's behaviour here: http://jsfiddle.net/symjp/.
firefox display thing intended. chrome/chromium 25/26.
if regression in recent chrome versions, bug reported?
added apparent error persists in chrome 29.
change height min-height: http://jsfiddle.net/n4rv8xws/
this fixed me in chrome 39:
html, body { min-height: 100%; }
i agree assertion chrome regression.
Comments
Post a Comment