My goal is to have the button positioned at the bottom of the red div, nested inside it.
.grand-parent {
display: flex;
flex-direction: row;
flex-wrap: wrap;
height: 300px;
background-color: green;
}
.parent {
margin: 12.5px;
flex-grow: 0;
flex-shrink: 1;
flex-basis: calc(50% - 25px);
height: 200px;
background-color: red;
}
.table {
box-sizing: inherit;
display: table;
border-collapse: separate;
border-spacing: 2px;
border-color: grey;
}
.button {
box-sizing: border-box;
border-radius: 2px;
font-size: 12px;
line-height: 12px;
text-align: center;
align-items: center;
margin: 10px 0;
}
<div class="grand-parent">
<div class="parent">
<table class="table">
</table>
<button class="button">CLICK</button>
</div>
</div>
I am struggling to figure out how to position this button
at the bottom of its container (parent
in this case), as it keeps appearing right below the table
.
I have experimented with various properties like justify-content
, justify-items
, align-self
, and more, but haven't found the correct combination yet.