Flexbox container in Chrome doesn't get 100% height

fotonmoton

Flexbox column container inside another flex container doesn't get 100% height in Chrome, but in Firefox and Edge all ok.

Codepen example

.container {
  display: flex;
  flex-direction: column;

  height: 100%;
  width: 100%;

  .inside-container {
    display: flex;
    flex-direction: column;

    height: 100%;

  }
}
Michael Benjamin

You're missing a height: 100% on a parent element: <header>

Once you add that in, the layout works in Chrome, as well.

header {
   min-height: 100%;
   width: 100%;
   height: 100%; /* NEW */
}

Revised Codepen

When using percentage heights, Chrome requires that each parent element have a defined height. More details here:

When using percentage heights in flexbox, there are rendering differences among the major browsers. More details here:

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How do I get this div to height 100%? (flexbox on container)

From Dev

How to get the content of the bottom element of a flexbox to be 100% height its container

From Dev

3 rows, 100% height flexbox layout doesn't work on android

From Dev

Flexbox css get height 100%

From Dev

Internet Explorer doesn't honor my min-height: 100% with flexbox

From Dev

Flex basis 100% in column flexbox: full height in Firefox, not in Chrome

From Dev

Flexbox equal height doesn't work

From Dev

CSS - 100% height doesn't expand to content

From Dev

Why 100% height doesn't work

From Dev

How to make flexbox child's height to fit to content instead of 100% height of its container

From Dev

Why isn't `height: 100%` and absolute positioning working in flexbox?

From Dev

Container not going 100% height

From Dev

why doesn't height: 100% and width: 100% work?

From Dev

why doesn't height: 100% and width: 100% work?

From Java

Height 100% on flexbox column child

From Dev

Flexbox, absolute positioning and 100% height

From Dev

Flexbox, absolute positioning and 100% height

From Dev

Flexbox 100% Height Background Issue

From Dev

How to get 3 divs to align horizontally, with height of 100%, inside a container

From Dev

left menu on flexbox model doesn't expand it's height dynamically

From Dev

Can't get canvas element height to equal container height

From Dev

Overflow doesn't make flexbox container's children to resize

From Dev

CSS Flexbox position:absolute Container doesn't show all Elements

From Dev

Equal height Flexbox columns in Chrome

From Dev

Height is not correct in flexbox items in Chrome

From Dev

extjs container hbox height 100%

From Dev

Google maps doesn't appear when i set the height to 100%

From Dev

100% height of a button element in html doesn't work

From Dev

Floating div doesn't change its height to 100%

Related Related

  1. 1

    How do I get this div to height 100%? (flexbox on container)

  2. 2

    How to get the content of the bottom element of a flexbox to be 100% height its container

  3. 3

    3 rows, 100% height flexbox layout doesn't work on android

  4. 4

    Flexbox css get height 100%

  5. 5

    Internet Explorer doesn't honor my min-height: 100% with flexbox

  6. 6

    Flex basis 100% in column flexbox: full height in Firefox, not in Chrome

  7. 7

    Flexbox equal height doesn't work

  8. 8

    CSS - 100% height doesn't expand to content

  9. 9

    Why 100% height doesn't work

  10. 10

    How to make flexbox child's height to fit to content instead of 100% height of its container

  11. 11

    Why isn't `height: 100%` and absolute positioning working in flexbox?

  12. 12

    Container not going 100% height

  13. 13

    why doesn't height: 100% and width: 100% work?

  14. 14

    why doesn't height: 100% and width: 100% work?

  15. 15

    Height 100% on flexbox column child

  16. 16

    Flexbox, absolute positioning and 100% height

  17. 17

    Flexbox, absolute positioning and 100% height

  18. 18

    Flexbox 100% Height Background Issue

  19. 19

    How to get 3 divs to align horizontally, with height of 100%, inside a container

  20. 20

    left menu on flexbox model doesn't expand it's height dynamically

  21. 21

    Can't get canvas element height to equal container height

  22. 22

    Overflow doesn't make flexbox container's children to resize

  23. 23

    CSS Flexbox position:absolute Container doesn't show all Elements

  24. 24

    Equal height Flexbox columns in Chrome

  25. 25

    Height is not correct in flexbox items in Chrome

  26. 26

    extjs container hbox height 100%

  27. 27

    Google maps doesn't appear when i set the height to 100%

  28. 28

    100% height of a button element in html doesn't work

  29. 29

    Floating div doesn't change its height to 100%

HotTag

Archive