I have a flexbox container with row layout with three containers. The container on the right has the main content, and I want the left container to grow in height to match.
If I set the container's align-items
to stretch
it does what I want. However, I cannot use stretch
due to circumstances outside of my control.
The only real options I have are center
and flex-start
. However, percentage heights for .left
and .mid
appear to be completely ignored with these align-items
settings.
Is there any way to get the left container to grow with the parent's height other than switching to align-items: stretch
?
.container {
align-items: flex-start;
display: flex;
flex-direction: row;
border: 1px solid black;
}
.left {
width: 34%;
border: 1px solid red;
display: flex;
flex-direction: column;
align-items:center;
justify-content:center;
}
.mid {
width: 3%;
height: 100%;
border: 1px solid green;
}
.right {
border: 1px solid blue;
}
<div class="container">
<div class="left">
<div>Hello World!</div>
</div>
<div class="mid"></div>
<div class="right">
<div>Right content</div>
<div>Right content</div>
<div>Right content</div>
<div>Right content</div>
<div>Right content</div>
<div>Right content</div>
<div>Right content</div>
<div>Right content</div>
</div>
</div>