14 February, 2020

How to center a thing on a page

I somehow always need to google this. posting for good measure.

body {
    margin: 0;
}

.center-me {
    display: flex;
    justify-content: center;
    align-items: center;
    
    height: 100vh;
}