I have a scenario where I want two flexboxes in a container to fill the entire height of the container. The left flexbox should display an image that fills its entire space, while the right flexbox contains other content. However, I'm facing difficulties in making both flexboxes expand vertically to occupy the full container height.
Here is the HTML code:
<div class="container-fluid" id="mainContainerAboutUs">
<div class="row">
<div class="col-lg" id = "aboutUsLeft">
<img src = {% static 'media/cover.jpg' %} alt = 'About us' id = "aboutUsLeftImage">
</div>
<div class="col-lg" id = "aboutUsRight">
<img src={% static 'media/HIDDEN DIMSUM logo final.png' %} alt="logo" id = "aboutUsLogo">
<h1 id = "aboutUsRightHeader">We are dimsum!</h1>
<hr class = "cardDeckHorisontalLine">
<h3>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Saepe iure a quia ab, animi magni repellendus voluptatem quo magnam recusandae id sit, nam enim illum voluptatibus error possimus ratione quisquam.
</h3>
</div>
</div>
</div>
And here is the CSS code:
/*About us section */
#mainContainerAboutUs {
align-items: stretch;
display: flex;
}
#aboutUsLeft {
padding: 0px;
border: 5px solid grey;
}
#aboutUsLeftImage {
width: 100%;
height: auto;
margin-left: auto;
margin-right: auto;
overflow: hidden;
}
#aboutUsRight {
justify-content: center;
border: 5px solid grey;
}
#aboutUsLogo {
width: 10%;
height: auto;
margin-left: auto;
margin-right: auto;
display: block;
}
#aboutUsRightHeader {text-align: center;}
I've tried using align-items: stretch as suggested by sources online, but it's not working for me in this case. My goal, shown by the arrow in the image linked below, is to have both flexboxes expand to fill the entire container height.https://i.sstatic.net/3jydL.jpg