I'm facing a layout issue with a parent div and multiple child divs. Currently, the child divs are evenly spaced within the parent div, which works fine. However, I want the parent div to expand in height as more child divs are added, while keeping the height of the child divs constant. How can I achieve this? Currently, when new child divs are added, the parent div remains the same height and the child divs shrink to fit, but I want the opposite. I want the parent div to automatically adjust its height. Any guidance on how to accomplish this would be greatly appreciated. Thank you.
.items {
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: center;
position: absolute;
top: 6%;
left: 15%;
width: 70%;
height: 60%;
background-color: gold;
}
.data {
width: 100%;
height: 35%;
background-color: #187bcd;
border-top: 2px solid #000000;
}
<div class="items">
<div class="data">
</div>
<div class="data">
</div>
<div class="data">
</div>
<div class="data">
</div>
</div>