css - Flex-direction:column doesn't allow children to be scrollable in Firefox -


this question has answer here:

i using display flex element (.outer) should adjust height content must not exceed height (e.g. 100px).

once height exceeded want content inside start scroll vertically.

this behaviour works expected on chrome in firefox content wrapper (.wrapper) growth height of content (.list) , therefore not scrollable.

you can try using simplified example:

.outer {    display: flex;    max-height: 100px;    overflow: hidden;    flex-direction: column;  }    .wrapper {    display: flex;    width: 100%;    height: 100%;  }    .list {    width: 100%;    background: purple;    overflow: scroll;  }
<div class="outer">    <div class="wrapper">        <div class="list">        <p>1</p>        <p>2</p>        <p>3</p>        <p>4</p>        <p>5</p>      </div>      </div>    </div>

https://codepen.io/anon/pen/rzoppz


setting max-height height solves scroll problem causes white space if content not high enough.

add min-height:0 .wrapper class. work.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

.htaccess - ERR_TOO_MANY_REDIRECTS htaccess -