I purchased 2 couches from West Elm in January. I ordered them in person and scheduled for them to be delivered in April. That was a long time to wait but it was worth it to get some nice couches that we really liked.
Thanks for writing this! Another one to consider is
display: grid with
justify-content: center and
align-items: center .
With grid you can also use the shorthand
place-items: center to get the same result, though it isn’t yet fully browser-supported. https://developer.mozilla.org/en-US/docs/Web/CSS/place-items#Browser_compatibility
Hello Stephen Sun. Thanks for this amazing article. I think there is some problem with the translate transform method. This link describes the issue very well. https://stackoverflow.com/questions/37221125/centered-div-is-getting-cut-off-at-the-top
I strongly recommend not doing that. For one you are adding unnecessary markup (the container), unless you do have a natural wrapper.
You also will likely want to reset all text alignment inside the child element, otherwise you end up when centred text everywhere.
And once you do that, no child element will be centred anymore.