I have 4 different rows of two columns and I have a picture on one column and text on the other. As the text and images are different sized I want them to be in the middle vertically.
This is my code for one of the columns and CSS for that div
.col2 {
float: left;
width: 46%;
padding: 2%;
text-align: center;
position: relative;
justify-content: center;
height: 300px;
}
<div class="col2">
<img src="images/freelance.png" alt="three people watching a presentation">
</div>
<div class="col2">
<h2>Work as a Freelancer</h2>
<p>This session will set out the key points you need
to consider when taking on freelance work in order to make
sure you gain maximum professional and personal benefit.</p>
<div class="book">
<a class="booked" href="#" target="_blank"><p><b>Book 14th March 6pm</b></p></a>
</div>
</div>