How to make div occupy remaining height?

前端 未结 11 1100
遇见更好的自我
遇见更好的自我 2020-11-27 12:49

I have this problem, I have two divs:

<
11条回答
  •  无人及你
    2020-11-27 13:32

    I faced the same challenge myself and found these 2 answers using flex properties.

    CSS

    .container {
      display: flex;
      flex-direction: column;
    }
    
    .dynamic-element{
      flex: 1;
    }
    
    • https://stackoverflow.com/a/35348188/1084619
    • https://stackoverflow.com/a/35348188/1084619

提交回复
热议问题