I'm running into a weird inconsistency with an image on my website. It's structured like this:
<div class="intro">
<div>
<p>Some text</p>
<p>More text</p>
</div>
<img src="images/headshot.jpg" />
</div>
.intro {
display: flex;
align-items: center;
}
.intro>img {
width: 11rem;
height: 11rem;
border-radius: 6rem;
margin: 1rem 0;
align-self: center;
}
.intro>div {
padding-right: 1rem;
}
After a hard reload in Chrome 74, it renders like this (wrong):
But then if I inspect element and toggle any of the img
's properties off and on again, it renders like this (correct):
I've come across this question, which suggested adding align-self: center;
to the img
, but that hasn't helped.
You can see the issue live here: https://leonoverweel.com/. Any idea what the problem is?