Here's what I'm dealing with:
.flex-container {
display: flex;
justify-content: center;
padding: 5%;
position: relative;
}
.box1 {
position: absolute;
bottom: 0;
width: 100%;
height: 100%;
}
<div class="flex-container">
<div class="box1"></div>
<div class="box2"></div>
</div>
I'm trying to figure out how to keep box2 centered while positioning box1 at the bottom of the flex container. The issue is that when I use 'bottom' on box1, it only goes to the end of the padding due to the flex container having padding. Additionally, when I absolutely position box1, it causes box2 to stretch and fill the entire flex container since box1 is no longer part of the document flow.