Here's how you can center this div on a page:
place-items: center center;
These 3 lines of CSS:
- Make the body as tall as the device's screen, so centering something actually looks centered
- Indicate that you want to use CSS grid
- Place the grid's one "item" (the div) in the center vertically and the center horizontally
Follow my twitter (@benborgers)
to see the work-in-progress of coding projects I’m working on!