I'm working on a card design that contains a div with 3 elements - 2 headers and a paragraph. I need to ensure there is consistent spacing between each element and the top/bottom of the card. Currently, there seems to be too much margin after the last element at the bottom. How can I achieve uniform vertical spacing in this layout?
Below is the code snippet:
.homeResourcesContainer{
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 20px;
}
.homeResource{
padding: 30px;
margin: 100px;
width: 500px;
height: 450px;
border-radius: 18px;
background: #800400;
box-shadow: 5px 5px 15px rgba(0,0,0,0.9);
}
.homeResourceContent{
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-evenly;
color: white;
font-family: "Source Sans Pro", sans-serif;
}
<div class="homeResourcesContainer">
<div class="homeResource">
<div class="homeResourceContent">
<h1 class="homeResourceHeader">Courses</h1>
<p class="homeResourceDescription">Nehemiah University offers a variety of different courses so you have the skills to get to where you want to be.
Whether it be learning how to operate a forklift, apply for a loan, or even learning about science and math,
Nehemiah University will give you the tools to take your personal and proffesional life to the next level.
Sign up for a class and find out what it's all about!</p>
<h2>Click this card to go to the Courses tab!</h2>
</div>
</div>
<div class="homeResource">
<div class="homeResourceContent">
<h1>Training Material</h1>
<p>We want our Nehemiah Family Members to be as succesful as possible in their role. Through proper training and growth initiatives,
we strive to ensure each of our Family Members is achieving their full potential. Use these training materials to learn on the job
skills such as how to labeler machine, filling out time cards, requesting time off, and many more skills to help you on your Nehemiah Journey!</p>
<h2>Click this card to go to the Training Materials tab!</h2>
</div>
</div>
<div class="homeResource">
<div class="homeResourceContent">
<h1>Resources</h1>
<p>Need access to resources for personal development? Nehemiah's social service team offers a variety of different resources and connections
to help you with whatever personal or professional issues you may be experiencing. We want all of our Family Members to have access to professional resources
that help them grow as individuals. Click the Resources tab to check out our pillars of personal development and the resources we offer!
</p>
<h2>Click this card to go to the Resources tab!</h2>
</div>
</div>
</div>