Having trouble aligning an image/logo next to my header text while maintaining its aspect ratio and fitting within the container size. The goal is to have both the text and image horizontally centered. The parent div cannot have a fixed height as it needs to adjust based on the text size. I've experimented with using tables and before: pseudo elements, but haven't found a solution yet. Here's what I have so far, but it's not working as intended.
.batman {
font-size: 20px;
font-weight: bold;
display: inline-block;
width: 100%;
}
.batman img {
min-width: 100%;
min-height: 100%;
}
<div class="batman">
<img src="https://i.imgur.com/JSWi9SB.png" /> title goes here
</div>
jsfiddle: https://jsfiddle.net/sxd91gqc/