How can an html element fill out 100% of the remaining screen height, using css only?

后端 未结 17 1824
名媛妹妹
名媛妹妹 2020-12-22 16:13

I have a header element and a content element:

#header
#content

I want the header to be of fixed height and the content to fill up all the

17条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-22 17:16

    #Header
    {
    width: 960px;
    height: 150px;
    }
    
    #Content
    {
    min-height:100vh;
    height: 100%;
    width: 960px;
    }
    

提交回复
热议问题