Looking to present a flex grid with options for users, ensuring boxes have equal height for consistent button positioning at the bottom. Check out the code snippet below:
.site-membership-breakdown {
width: 100%;
margin-left: auto;
margin-right: auto;
margin-top: 0;
margin-bottom: 15px;
display: flex;
flex-direction: row;
flex-wrap: wrap;
text-align: center;
justify-content: center;
padding-top: 15px;
}
.site-membership-breakdown-module {
width: 20%;
/*In order to center buttons within DIV and position them 15px up from the bottom, don't set height*/
display: flex;
margin-top: 0px;
margin-bottom: 10px;
margin-left: 10px;
margin-right: 10px;
background-color: #FFFFFF;
border-radius: 0;
border: 10px solid #000000;
padding: 10px;
}
@media only screen and (max-width: 500px) {
.site-membership-breakdown-module {
width: 100%;
height: 250px display: flex;
margin-top: 0px;
margin-bottom: 10px;
margin-left: 10px;
margin-right: 10px;
background-color: #FFFFFF;
border-radius: 0;
border: 10px solid #000000;
padding: 10px;
}
}
.site-membership-breakdown-module-inner {
display: block;
width: 100%;
position: relative;
}
...
Trying to align all buttons at the same height across containers without setting a fixed height. See the updated snippet below for reference:
.site-join-button {
height: 60px;
width: 120px;
padding: 0;
margin-left: 0;
margin-right: 0;
margin-top: 20px;
margin-bottom: 15px;
color: #FFFFFF;
background-color: #000000;
border: 5px solid #000000;
border-radius: 0;
position: absolute;
bottom: 0;
}
...
...
If buttons are floating over content due to lack of fixed container height, aim to align them by positioning at the bottom with a slight float using margins. View the current vs desired outcome here.