Flex sidebar: how to grow to 100% of height

前端 未结 3 1873
小鲜肉
小鲜肉 2021-01-25 13:42

I´m building a sidebar using CSS flex and I need it to grow vertically to fill the whole screen vertical height. Here is a skeleton of what I´m doing.

JSFiddle here

3条回答
  •  忘了有多久
    2021-01-25 14:24

    body, html {
      height: 100%;
    }
    

    And the fiddle https://jsfiddle.net/gxkezny9/

    One of the parent containers wasn't 100% height

提交回复
热议问题