flexbox misbehaving with max-height

后端 未结 4 858
夕颜
夕颜 2020-12-05 17:34

My issue is probably best explained by example. This following jsfiddle will work in Chrome:

http://jsfiddle.net/ga6g4/

As you can see, I\'ve got a fixed-hei

4条回答
  •  情书的邮戳
    2020-12-05 18:06

    I think the answer is that you are using flex-direction:column.

    Although it's still not entirely clear to me what you are trying to achieve switching to flex-direction:row seems to have the right effect.

    JSfiddle Demo

    CSS

    .lhs {
        position: absolute;
        top: 8px;
        left: 8px;
        width: 250px;
        max-height: 100px;
        border: 1px solid red;
        display: flex;
        flex-direction: row;
    }
    
    .panel-container {
        flex: 1;
        overflow: auto;
    }
    

提交回复
热议问题