I'm trying to get 2 divs
side by side using flexbox
, but the div with the text in it is taller than the image side and I can't figure out why.
.serviceEntry {
display: flex;
margin-bottom: 2rem;
}
.serviceImg,
.serviceContent {
flex: 1;
}
.serviceContent {
color: white;
background-color: #93AEC2;
padding: 0px 10px;
line-height: 2;
}
<div class="serviceEntry">
<div class="serviceImg">
<img src="https://hope.rudtek.dev/wp-content/uploads/2020/08/hopewellness-cbt-falls-church-37-1024x668.jpg" class="attachment-large size-large" alt="" srcset="https://hope.rudtek.dev/wp-content/uploads/2020/08/hopewellness-cbt-falls-church-37-1024x668.jpg 1024w, https://hope.rudtek.dev/wp-content/uploads/2020/08/hopewellness-cbt-falls-church-37-300x196.jpg 300w, https://hope.rudtek.dev/wp-content/uploads/2020/08/hopewellness-cbt-falls-church-37-768x501.jpg 768w, https://hope.rudtek.dev/wp-content/uploads/2020/08/hopewellness-cbt-falls-church-37-1536x1001.jpg 1536w, https://hope.rudtek.dev/wp-content/uploads/2020/08/hopewellness-cbt-falls-church-37.jpg 2000w"
sizes="(max-width: 1024px) 100vw, 1024px" width="1024" height="668">
</div>
<div class="serviceContent">
<h3><a href="https://hope.rudtek.dev/services/women/">Women</a></h3>
We provide specialized individual treatment and cognitive behavioral therapy to empower women in all aspects of life, including personal growth, overcoming mood and anxiety disorders, and navigating major life transitions.
</div>
</div>
Here is my fiddle: https://jsfiddle.net/bu1q359z/