I'm trying to vertically center the content of an inline-block and I can't figure it out. I've tried different options I've found here such as the flex and the transform but none of them worked for me. I'm probably missing something.
The idea is to have several divs (steps) with one image each on the left and some lines on the right, centered vertically.
Any help is appreciated
HTML:
<div class="med-step-wrapper">
<div class="med-step">
<div class="med-step-logo">
<img alt="step 1" src="imagesource"/>
</div>
<div class="med-step-text">
<p>1. Register
<p>Morbi ut egestas urna, et interdum dolor. Duis fermentum orci in
nisi egestas, et imperdiet mauris luctus. Praesent vulputate diam
<p><button>
</div>
</div>
</div>
CSS:
.med-step-wrapper {
width: 95%;
margin: 0 auto;
}
.med-step {
width: 100%;
}
.med-step-logo {
width: 33%;
display: inline-block;
padding: 3rem;
}
.med-step-logo img {
width: 100%;
height: auto;
}
.med-step-text {
width: 66%;
display: inline-block;
font-family: 'DIN1451EngschriftRegular';
}
.med-step-text p {
}
stuff
` and `` Just because you can omit end tabs does not mean it is always a good idea IMHO A button requires both start and end tags – Mark Schultheiss Feb 17 '19 at 12:53