2

I have a flex-box container and a child in it, The child should fill the container but should not go out of bound.

The following CSS works fine on all browsers except for Edge, the content goes out of bound

.wrapper {
   display: flex;
   flex-direction: column;
   height: 200px;
}

.child {
   flex: 1;
}

Here is a stackblitz reproduction, please try it on Chrome and Edge to see the difference.

Why isn't flex: 1 working on Edge when flex-box is supported?

P.S. Using height: 100% will fix it, but another issue occurs (in Edge only), the horizontal scrollbar gets pushed down and disappears.

Chrome screenshot (works properly)

enter image description here

Edge screenshot (horizontal scrollbar is pushed down when it should not)

enter image description here

This demo uses height: 100%

https://murhafsousli.github.io/ngx-scrollbar/

Murhaf Sousli
  • 12,622
  • 20
  • 119
  • 185

0 Answers0