I have a html layout like this:
<div class="container">
<div class="content">
// content goes here
</div>
</div>
I have 100vh applied to container div. And I need to vertically center content. I found I could vertically center everything inside content div if I apply the following CSS to both container and content, but I'm wondering if it's bad practice and if I should be doing something else instead?
display: flex;
justify-content: center;
align-items: center;
Thanks!