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

后端 未结 17 1819
名媛妹妹
名媛妹妹 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:01

    You can also set the parent to display: inline. See http://codepen.io/tommymarshall/pen/cECyH

    Be sure to also have the height of html and body set to 100%, too.

提交回复
热议问题