I am trying to have divs of the same size, with some of the content within each aligned, but with different lengths.
I would like the icon and the text to stay in the same position on all divs, but have the divs stretch at the bottom so they are the same size.
Here is my code:
.servicescontainer {
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items: center;
justify-content: center;
background-color: white;
border-radius: 30px;
padding: 20px;
box-shadow: 3px 3px 20px #333;
min-height: 240px;
}
.servicesicon {
width: 50px;
margin-left: auto;
margin-right: auto;
margin-top: 20px;
}
.servicestext {
width: 100%;
text-align: center;
position: relative;
padding-right: 10px;
}
<div class="servicescontainer">
<div class="servicesicon">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg">
</svg>
</div>
<div class="servicestext">
<h4>
Repairs
</h4>
<ul>
<li>Custom Replacement Parts</li>
<li>Hydraulic Cylinder Repair & Refurbish</li>
<li>Heavy Equipment Repair & Modification</li>
</ul>
</div>
</div>
<div class="servicescontainer">
<div class="servicesicon">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg">
</svg>
</div>
<div class="servicestext">
<h4>
Welding & Fabrication
</h4>
<ul>
<li>Certified Steel, Aluminum & Stainless Welding</li>
<li>Structural Fabrication & Assembly</li>
<li>Metal Forming & Cutting</li>
<li>Onsite Portable Services</li>
</ul>
</div>
</div>
I've tried using position: relative and position: absolute with no luck. I have tried using min-height but it stretches the text and the h4 titles end up not being aligned properly. (svg removed for cleanliness)