Without touching my HTML, how can I position all the text so that it's positioned in the middle of my image?
I've tried using justify-content, align-content, etc, but it's not working.
h1 { grid-area: h1; }
h2 { grid-area: h2; }
p { grid-area: p; }
img { grid-area: img; }
.grid {
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-areas:
"h1 img"
"h2 img"
"p img"
". img";
text-align: center;
}
<div class="grid">
<h1>Header</h1>
<h2>Subheader</h2>
<img src="https://images.unsplash.com/photo-1594041221013-7f4944a487cf?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=634&q=80" alt="">
<p>some paragraph text...</p>
</div>