Skip to content

Instantly share code, notes, and snippets.

@ohiosveryown
Created September 15, 2020 17:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ohiosveryown/deac5188b536a7fb6537cfaf3e941293 to your computer and use it in GitHub Desktop.
Save ohiosveryown/deac5188b536a7fb6537cfaf3e941293 to your computer and use it in GitHub Desktop.
Vertically and Horizontal Centering with CSS Grid
.parent {
display: grid;
place-items: center;
height: 100vh;
}
.child {
width: 50vw; height: 50vh;
background: papayawhip;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment