How to make div occupy remaining height?

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

I have this problem, I have two divs:

<
11条回答
  •  [愿得一人]
    2020-11-27 13:11

    Demo

    One way is to set the the div to position:absolute and give it a top of 50px and bottom of 0px;

    #div2
    {
        position:absolute;
        bottom:0px;
        top:50px
    }
    

提交回复
热议问题