JSFiddle - React, Tailwind, and code Playground
HTML
<div class="hero_image">
<div></div>
<div class="content">
<h1>Heading <br>more text <br>last bit of text</h1>
</div>
<div></div>
</div>
CSS
.hero_image {
min-height: 100vh;
background-color: yellow;
display: grid;
grid-template-rows: 1fr auto 2fr;
}
.hero_image > .content {
width: 100%;
display:flex;
justify-content: center;
}
.hero_image h1 {
font-size: 72px;
padding-top: 20px;
}
/* just to show margin */
.hero_image>div:first-child,
.hero_image>div:last-child {
background: red;
}
body {
margin: 0;
}