Skip to content

Instantly share code, notes, and snippets.

@tcelestino
Created October 2, 2020 12:54
Show Gist options
  • Save tcelestino/cc2b206672b2e8490a7ed9edb92bb546 to your computer and use it in GitHub Desktop.
Save tcelestino/cc2b206672b2e8490a7ed9edb92bb546 to your computer and use it in GitHub Desktop.
place item center
<div class="parent">
<div class="child">
1 line center
</div>
</div>
.parent {
display: grid;
place-items: center;
width: 100vw;
height: 100vh;
background: #a96da3;
}
.child {
background: #fff;
padding: 2em;
border-radius: 20px;
font-size: 1em;
font-style: italic;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment